CrystalClear Syntax Before Reading Records

Truncate( x )
Truncate( x, #places )


Discards every digit of to the right of the y'th digit of x. Y is an optional parameter, if it is not supplied, 0 is taken, that is: Truncate(x) is the same as Truncate(x,0).

Usage:

Truncate( x )
Truncate( x, #places )

Parameters:

x A (decimal) number
#places Whole number of decimal places [OPTIONAL...default: 0].

Return:

Numeric value

Examples:

truncate( 3.8 )		//3
truncate( 1.2 )		//1
truncate( 4.5 )		//4
truncate( 3.14, 1)		// 3.1
truncate(23.112, -1)	// 20.0

See also:


i-net software strives to provide accurate product documentation. Please give us your feedback using the form below.
NOTE: This form is for documentation feedback only. For technical assistance, please send an email to crystalclear@inetsoftware.de.

This page is: very poor very good
Comment: