Int()

 <  Day Day Up  >  

Int()

Category: Number

Syntax: Int ( number )

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

Description: Returns the whole number (integer) part of number without rounding. Digits to the right of the decimal point are dropped.

Examples:

 

 Int (1.0005) 

Returns 1 .

 

 Int (-1.0005) 

Returns -1 .

Comments:

Note that for positive numbers , Floor() and Int() return the same results, however, for negative numbers, Int() returns the next larger integer, whereas Floor() returns the next smaller integer.

There are many practical uses for the Int() function. For instance, given any date, to find the date of the Sunday preceding it, use the formula GetAsDate (Int (myDate/7) * 7) . Similarly, to test whether an integer is odd or even, you can test whether Int (num/2) = num/2 .

 <  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