
Section 8. Processing and Math Instructions
Remarks
The following table illustrates how Result is determined:
If expression1 is And expression2 is The result is
True True True
True False False
False True True
False False True
False Null True
The IMP operator performs a bitwise comparison of identically positioned bits
in two numeric expressions and sets the corresponding bit in result according
to the following table:
If bit in expression1 is And bit in expression2 is The result is
0 0 1
0 1 1
1 0 0
1 1 1
Int, Fix
Return the integer portion of a number.
Syntax
x = Int (source)
x = Fix (source)
Remarks
The source can be any valid numeric expression. Both Int and Fix remove the
fractional part of source and return the resulting integer value.
If the numeric expression results in a Not-a-Number, Int and Fix return a Not-
a-Number.
The difference between Int and Fix is that if number is negative, Int returns
the first negative integer less than or equal to number, whereas Fix returns the
first negative integer greater than or equal to number. For example, Int
converts -8.4 to -9, and Fix converts -8.4 to -8.
Int and Fix Function Example
This example illustrates the use of Int and Fix.
8-16
Commentaires sur ces manuels