expression mod
expression
Each expression yields an integer
, a number
, or a complex
.
The mod
operator evaluates to the modulus of the given values. (In HyperTalk, the mod
operator evaluates to the remainder after division instead.)
If either given value is a complex
, the evaluated value will be a complex
. Otherwise, the evaluated value will be a number
.
In XION, the expression x
is equivalent to mod
yx-y*
. floor
(x/y)
In HyperTalk, the expression x
is equivalent to mod
yx-y*
. What HyperTalk calls the trunc
(x/y)mod
operator is implemented in XION as the rem
operator instead. This does not change the value of the operator for positive values, but does change the value of the operator for negative values.