Operators

div

Supported By

Syntax

expression div expression

Each expression yields an integer, a number, or a complex.

Description

The div operator evaluates to the floor of the quotient of the given values. (In HyperTalk, the div operator evaluates to the truncated quotient instead.)

Notes

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 div y is equivalent to floor(x/y).

Compatibility

In HyperTalk, the expression x div y is equivalent to trunc(x/y). What HyperTalk calls the div operator is implemented in XION as the quot 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.

See Also

divide, /, mod, trunc