INT
From STX Wiki
Jump to navigationJump to search
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