Page History
...
Parameter | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Expression | May yield any numeric value. Int truncates any fractional portion of an expression. Arithmetic operations that are specified are calculated using 15 digit accuracy, but Int truncates, not rounds, the decimal fraction. In the following example: MILES = Int (59.99) the value of 59 is assigned to MILES. If X is any number, then Int(X) is the largest integer less than or equal to X.
To convert X from dollars to cents, the following expression can be used: CENTS = Int(X*100) All truncations are toward the minus infinity. |
See also
Example
Code Block |
---|
* This determines if NUMBER is evenly divisible by DIVISOR If (NUMBER / DIVISOR) = Int(NUMBER / DIVISOR) Then Call Msg("", NUMBER: " is evenly divided by ": DIVISOR) End * round value value = int(value + .5) |