if 简单语句问题编译出错!
总 提示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;