Trunc

Top  Previous  Next

Prototype

 

IntNumber:=Trunc(floatNumber)

 

Description

 

Returns the integer part of a real number.

 

Parameters

 

FloatNumber: real number from with obtain the integer part.

 

Returned value

 

IntNumber: integer value corresponding to the integer part of the real number.

 

Notes

 

None.

 

Example

 

// Initialize a variable with a floating value

Value:=10.6;

 

// Round the value: the result is 10

TruncValue:=Trunc(Value);