Returns the Sign of the Value.Unit
QESBPCSMath
Declaration
Function ESBSign(const X: Extended): ShortInt;
Description
-1 if X < 0.
0 if X = 0.
1 if X > 0.
Category
Arithmetic Routines for Floats
Arithmetic Routines for Integers
Implementation
 
  | function ESBSign (const X: Extended): ShortInt;
begin
     if FloatIsNegative (X) then
          Result := -1
     else if FloatIsZero (X) then
          Result := 0
     else
          Result := 1
End; | 
Declaration
Function ESBSign(const X: Int64): ShortInt;Implementation
 
  | function ESBSign (const X: Int64): ShortInt;
begin
     if X < 0 then
          Result := -1
     else if X = 0 then
          Result := 0
     else
          Result := 1
End; | 
Declaration
Function ESBSign(const X: LongInt): ShortInt;Implementation
 
  | function ESBSign (const X: LongInt): ShortInt;
begin
     if X < 0 then
          Result := -1
     else if X = 0 then
          Result := 0
     else
          Result := 1
End; | 
| HTML generated by Time2HELP | 
http://www.time2help.com