Programmer Guide/Command Reference/INT: Difference between revisions
From STX Wiki
Jump to navigationJump to search
(initial import) |
m (1 revision: Initial import) |
(No difference)
|
Revision as of 17:31, 18 November 2010
INT
var := INT expression
var := INTCHECK expression
-> var = evaluation result as an integer
Evaluate a numeric expression and assign the scalar result. Please note that the expression is calculated in double precision before being converted to an integer. Integer conversion is of the 'cut-off' variety. E.g. 3.9
-> 3
. If the expression is syntactically ill-formed, an error (INT
) or warning (INTCHECK
) is reported.
See also: NUM, EVAL
#int := int 3.1 // == 3 #int := int 3.9 // == 3 #int := int 3.9 * 3.9 // == 15 #int := int int(3.9) * int(3.9) // == 9