Truncate – AMT Datasouth PAL User Manual
Page 197
Advertising

191
truncate
truncate
Description
Eliminates the fractional portion of a given value.
Usage
AnyNum
truncate
TruncatedNum
AnyNum
Integer or fixed-point. Value to truncate.
TruncatedNum Integer or fixed-point. Integer portion of AnyNum. The type of the returned
value matches the type of the supplied parameter.
Comments
Although this operator will accept integer values, this operator has no affect upon integers. The
following table shows the affect of the truncate operator upon various fixed-point values.
1.6
ceiling
1.0
1.5
ceiling
1.0
1.4
ceiling
1.0
1.0
ceiling
1.0
0.0
ceiling
0.0
-1.0
ceiling -1.0
-1.4
ceiling -1.0
-1.5
ceiling -1.0
-1.6
ceiling -1.0
Advertising