VARKON Version 1.15 1997-10-24


trunc - Function

Mathematical function


Description

Returns the integer part of an argument (truncates).

Syntax

trunc(x)

FLOAT x;


Principal parameters

x - Any value


Optional parameters

None.


Return value

An INT value equal to the (truncated) integer part of x.

Examples

TRUNC(10.25) = 10
TRUNC(10.75) = 10
TRUNC(0) = 0
TRUNC(-10.25) = -10
TRUNC(-10.75) = -10


VARKON Homepage Index