INT

From STX Wiki
< Programmer Guide‎ | Command Reference
Revision as of 14:05, 17 May 2010 by 193.171.195.8 (talk) (initial import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

Navigation menu

Personal tools