%TRUNC

Truncate a numeric expression

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
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)