//Delphi 函数-IIF // 实例-ChkValue := IIF(TCheckBox(tsPzJz.Controls[i]).Checked, '', ''); function IIF(lExp: boolean; vExp1, vExp2: variant): variant; overload; begin if lExp then Result := vExp1 else Result := vExp2; end;