Result := NextHook <> 0
等价于
if NextHook <> 0 
then Result := true
else Result := false
就是把判断NextHook <> 0的布尔值返回给Result

解决方案 »

  1.   

    是这样
    if Next Hook <> 0 then
      Result := True
    else 
      Result := False;
      

  2.   

    应该是
    if NextHook<>0 then 
      result:=true
    else
      result:=false
      

  3.   

    NextHook <> 0
    是一个值类型为 "Boolean" 的表达式
    因为 Boolean 表达式一般都用于 if 语句,容易给人以错觉,仿佛只能用于 if 语句:
    if ( NextHook <> 0 ) then ...实际上,Boolean 类型的值和 Integer, Double, Record 之类一样,可以赋值、运算:var i, j;
    ...
    i = 1;
    j = 1;
    Result := i + j;
    可以,为什么
    Result := i <> 1;
    Result := (i = 1) and (j = 3);
    Result := (i > 0) xor (j < 0);
    就不可以?纠正错误的习惯看法,就豁然开朗了
      

  4.   

    相当于:
    if NextHook <> 0 then 
      Result:=True
    else 
      Result:=False;
    一种简化的并且很妙的写法。