%TRUNC

Truncate a numeric expression

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
whole_num = %TRUNC(expression)

Return value

whole_num

The whole-number portion of expression. The result has the same numeric data type as expression. If expression is implied-decimal data type, the result has no fractional precision. (n)

Arguments

expression

A numeric expression to be truncated. (n)

Discussion

The difference between %TRUNC and %TRUNCATE is that with implied-decimal arguments, %TRUNC returns a result with no fractional precision and %TRUNCATE returns a result with the same fractional precision as expression.

Examples

The following intrinsic function returns the value 33.

dvar = %trunc(33.5)