tempwidth, tempheight :Integer;
if (imgSingle.Picture.Width /240) >= (imgSingle.Picture.Height/320) then begin
tempwidth := 240;
tempheight := (320/imgSingle.Picture.Width/240);
end;
为什么显示[Error] Main.pas(427): Incompatible types: 'Integer' and 'Extended' 啊
哪里不对啊 郁闷
if (imgSingle.Picture.Width /240) >= (imgSingle.Picture.Height/320) then begin
tempwidth := 240;
tempheight := (320/imgSingle.Picture.Width/240);
end;
为什么显示[Error] Main.pas(427): Incompatible types: 'Integer' and 'Extended' 啊
哪里不对啊 郁闷
解决方案 »
- 怎么使用InternetGetCookieEx函数,wininet里没找到它
- SQL语句
- 用FASTREPORT求和出现的不解的问题,急!!
- SQL语句问题 Access数据库 大家多多帮忙,赏金大大的
- 如何知道都有哪些用户正在和数据库相连
- 在VB中输入对话框的用户名与密码如何与数据库里的用户名和密码对应起来?
- 怪!怪!怪!为什么ComboBox删除了一个Item后不能自动更新其Text值,我用了Refresh方法都没用!
- 实时录音&实时MP3压缩组件源码发布1!
- 新手问题:如何取得打开后处理再关闭的窗口中的控件内容(窗口没有释放时)
- 哪会高手知道怎么通过ADOCONNECT删除ACCESS里的数据据表?急???????
- pos函数怎么查找第二个,或者多个位置呢?
- const定义疑惑
tempwidth := 240;
tempheight := Round(320/imgSingle.Picture.Width/240);
end;
就是这句有问题,=右边的结果是浮点型,左边定义的是整形变量无法付值
建议 round 或者trunc一下,要不四舍五入,要不不要小数 具体写法如下:
tempheight := trunc((320/imgSingle.Picture.Width/240));
Or
tempheight := round((320/imgSingle.Picture.Width/240));