Truncate()

 <  Day Day Up  >  

Truncate()

Category: Number

Syntax: Truncate ( number ; precision )

Parameters: number ”any expression that resolves to a numeric value; precision ”any expression that resolves to a numeric value.

Description: Returns the specified number truncated to the specified number of decimal places (precision). Unlike the Round() function, the Truncate() function simply discards further digits without performing any sort of rounding.

Examples:

 

 Truncate (Pi ; 6) 

Returns 3.141592 .

 

 Truncate (Amount ; 2) 

Returns 54.65 when Amount contains 54.651259.

 

 Truncate (1234.1234 ; 0) 

Returns 1234 .

 

 Truncate (-1234.1234 ; 0) 

Returns “1234 .

Comments:

Truncating a number by using a precision parameter of 0 has the same effect as taking the Int() of that number. Truncate (x ; 0) = Int (x) .

Negative values can be used for the precision parameter in the Truncate() function. For instance, Truncate (1234.1234 ; -1) returns 1230 . Truncate (1234.1234 ; -2) returns 1200 .

 <  Day Day Up  >  


QUE CORPORATION - Using Filemaker pro X
QUE CORPORATION - Using Filemaker pro X
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 494

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net