omron — INT real-valued function

INT real-valued function INT real-valued function Syntax INT (value) Function Return the integer part of the value. Parameter value Real-valued expression whose integer part is returned by this function. Details Returns the portion of the value parameter to the left of the decimal point (when the value is written without the use of scientific notation). The value is not rounded before dropping the fraction. The sign of the value parameter is preserved unless the result is zero. Examples INT(0.123) ;Returns 0.0 INT(10.8) ;Returns 10.0 INT(-5.462) ;Returns -5.0 INT(1.3125E+2) ;Returns 131.0 INT(cost) ;Returns the value of "cost", ;truncated to an integer.

INT(cost+0.5*SIGN(cost)) ;Returns the value of "cost", rounded ;to the nearest integer. (The SIGN ;function needs to be included to ;correctly round negative values of ;"cost".) Related Keyword FRACT real-valued function eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 298