integer

wshd 2003-03-22 11:54:56
var
a:integer;
begin
a:=a/49;
提示:

[Error] Fpremanage.pas(227): Incompatible types: 'Integer' and 'Extended'
请问如何修改?谢谢
...全文
26 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
lyq 2003-03-22
  • 打赏
  • 举报
回复

/ 返回实型,怎能给整形变量呢。

ziqing 2003-03-22
  • 打赏
  • 举报
回复
用div函数
freezm 2003-03-22
  • 打赏
  • 举报
回复
整除应该用 DIV
  • 打赏
  • 举报
回复
a:=Round(a/49) or a:=Reunc(a/49)
swayi21 2003-03-22
  • 打赏
  • 举报
回复
up
sysu 2003-03-22
  • 打赏
  • 举报
回复
a:=a div 49; // 整除
ourme 2003-03-22
  • 打赏
  • 举报
回复
Operator Operation Operand types Result type Example
+ addition integer, real integer, real X + Y
? subtraction integer, real integer, real Result - 1
* multiplication integer, real integer, real P * InterestRate
/ real division integer, real real X / 2
div integer division integer integer Total div UnitSize
mod remainder integer integer Y mod 6

flybat 2003-03-22
  • 打赏
  • 举报
回复
对,div取整,mod取余
geodgehoul 2003-03-22
  • 打赏
  • 举报
回复
up

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧