112 @INT[n] DMC-1400 Series Command Reference
@INT[n]
FUNCTION: Integer part
DESCRIPTION:
Returns the integer part of the given number. Note that the modulus operator can be
implemented with @INT (see example below).
ARGUMENTS: @INT[n]

n is a signed number in the range -2147483648 to 2147483647.

USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage ALL
RELATED COMMANDS:
@FRAC Fractional part
EXAMPLES:
:MG @INT[1.2]
1.0000
:MG @INT[-2.4]
-2.0000
:
#AUTO ;'modulus example
x = 10 ;'prepare arguments
y = 3
JS#mod ;'call modulus
MG z ;'print return value
EN
'subroutine: integer remainder of x/y (10 mod 3 = 1)
'arguments are x and y. Return is in z
#mod
z = x - (y * @INT[x/y])
EN