/ ÷ div
If you use /
or ÷ the result is always
a real
value type. If you use
div
, the result is always an
integer
.
The three division operators differ in that /
and
÷ produce real
value types, whereas
div
always returns an integer
.
div
is the opposite of mod
. For
example, 10 div 3 results in 3 and the remainder of 1 is ignored; 10
mod 3 results in 1 (the remainder) and the 3 result is ignored. You
produce the ÷ character by typing
option-/
. Remember not to confuse the
/
division operator with the \ escape character
that is used to produce string characters such as a
tab
(\t) or return
(\r).