if 简单语句问题编译出错!

chinawcs 2006-08-14 08:48:06
总 提示else found 该怎么写呀?
Function CustomSortProc( Item1, Item2 : TListItem; lParam : LongInt):Integer; stdcall;
begin
Result:=0;
if (Item1=nil)or(Item2=nil)then
exit;
if lParam = 0 then

result := CompareText(Item1.Caption,Item2.Caption

else if lparam > 0 then
result := CompareText(Item1.SubItems[Lparam-1],Item2.SubItems[Lparam-1]);
Result:= Result * Item1.ListView.Column[lParam].Tag ;

end;
...全文
145 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
chinawcs 2006-08-14
  • 打赏
  • 举报
回复
我真是太粗心了。结贴了
SmallMaker 2006-08-14
  • 打赏
  • 举报
回复
result := CompareText(Item1.Caption, Item2.Caption
后面少个括号,应该是
result := CompareText(Item1.Caption, Item2.Caption)
DoerSoft 2006-08-14
  • 打赏
  • 举报
回复
result := CompareText(Item1.Caption,Item2.Caption //少了)

5,928

社区成员

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

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