| Description |
|
The IsInfinite function returns True if FloatNumber is infinite in value.
|
|
| Related commands |
| Infinity |
|
Floating point value of infinite size |
| IsNaN |
|
Checks to see if a floating point number holds a real number |
| NaN |
|
Not a real number |
|
|
|
| Example code : Assign Infinity to a number and then test using IsInfinite |
var
float : Double;
begin // Set the number to infinity float := Infinity; // Equivalent to 1.0/0.0
// Although infinite, we can still display it
WriteLn('float = '+FloatToStr(float));
// And we can test to see if it is infinite
if IsInfinite(float)
then WriteLn('float is infinite')
else WriteLn('float = '+FloatToStr(float));
end;
|
| Show full unit code |
float = INF
float is infinite
|
|