本帖最后由 feiyushenme 于 2012-09-09 16:48:11 编辑

解决方案 »

  1.   

    if Boolean类型的函数 then 
    这不就是调用那个函数的么?delphi2007没用过,d7中,重新编译一下工程看能不能用
      

  2.   

    boolean类型的函数返回值就是一个布尔值(True or False),所以可以是 if ... then 这样的型式调用函数。
      

  3.   

    if Boolean类型的函数 then
    这时就先调用了这个函数,再用它的返回值作用到if then语句中。
    没用过2007
      

  4.   

    function xx(value:integer):boolean;
    begin
     result:=value>0;
    end;下面会先调用xx函数,然后判断返回值;和b:=xx(k); if b then结果一样的
    k:=100;
    if xx(k) then 
    showmessage('k>0')
    else
    showmessage('k<=0');
      

  5.   

    function IsFool(APerson: TPeople): Boolean;
    begin
      Result := True;
    end;