没有吧.你用case语句来实现吧.

解决方案 »

  1.   

    下列语言都不可以:Pascal,C,C++,Basic,Java,C#。
    你可以通过传递一个函数来解决。或者就像楼上说的,用Case。
      

  2.   

    那就自己写个函数吧。
    Function  Fun_Compare(Ad_a: double; Ad_b: double; As_Op: string; Ai_precision: longint) : Boolean ;
    begin
      if As_Op= '=' then
        if Round(Ad_A*Ai_precision) = Round(Ad_b*Ai_precision) then
          Result := true
        else
          result := False;
      if As_Op= '>' then
        if Round(Ad_A*Ai_precision) > Round(Ad_b*Ai_precision) then
          Result := true
        else
          result := false;
      if As_Op= '<' then
        if Round(Ad_A*Ai_precision) < Round(Ad_b*Ai_precision) then
          Result := true
        else
          result := false;
      if As_Op= '<>' then
        if Round(Ad_a*Ai_precision) <> Round(Ad_b*Ai_precision) then
          Result := true
        else
          result := false;
      if As_Op= '>=' then
        if Round(Ad_A*Ai_precision) >= Round(Ad_b*Ai_precision) then
          Result := true
        else
          result := false;
      if As_Op= '<=' then
        if Round(Ad_A*Ai_precision) <= Round(Ad_b*Ai_precision) then
          Result := true
        else
          result := false;
    end;
      

  3.   

    我曾经有过做法,用一个query,传到sql里面运算,很方便