[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
TRUNC Truncate Number to Integer pp 142
Syntax: Trunc (NumVar) ;
Type: Integer
Form: Procedure
Purpose: Truncate NumVar to integer variable.
Notes: Returns the greatest integer less than or equal to NumVar if
NumVar >= 0, or smallest integer of NumVar < 0.
Logic: IntegerResult <= NumVar >= 0 or IntegerResult >= NumVar < 0
----------------------------------------------------------------------------
Usage:
VAR
IntVar : Integer ;
RealVar : Real ;
BEGIN
Intvar := Trunc (IntVar) ;
IntVar := Trunc (RealVar) ;
IntVar := Trunc (1.456) ;
END.
See Also:
Int
Frac
Round
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson