关于 := if

随风来去 2016-10-25 06:33:58
一直用c++
这两天看到一段delphi代码,看到有如下语句,请教 := if 是什么意思呢?
tvTree.Width := if si.nMax;
...全文
133 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
随风来去 2016-10-26
  • 打赏
  • 举报
回复
引用 4 楼 leeky 的回复:
代码错误,去掉“if” 就是。 Delphi语法 if BoolF then //BoolF 可不加括号 StatmntA //不能有分号,若为整段,则用 begin ...end 括起来 else StatmntB; 对应C++ 中的: if (BoolF) StatmntA ; else StatmntB ;
呃,原来是代码错误啊
leeky 2016-10-26
  • 打赏
  • 举报
回复
代码错误,去掉“if” 就是。 Delphi语法 if BoolF then //BoolF 可不加括号 StatmntA //不能有分号,若为整段,则用 begin ...end 括起来 else StatmntB; 对应C++ 中的: if (BoolF) StatmntA ; else StatmntB ;
lyhoo163 2016-10-26
  • 打赏
  • 举报
回复
报谦,发贴错误。

16,747

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
  • 语言基础/算法/系统设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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