Vector Basic Interpreter Basic 80 Reference Manual - page 20
To
change
the
order
in which
the
operations
use
parentheses.
Operations
within
performed
first.
Inside
parentheses,
the
operations
is maintained.
Here
are
some
sample
algebraic
expressions
and
their
BASIC
counterparts.
are
performed,
parentheses
are
usual
order
of
Algebraic
Expression
X+2Y
Y
X--
Z
XY
z-
X+Y
-Z
(X2) Y
y
Z
X
BASIC
Expression
X+Y*2
X-y/z
X*Y/Z
(X+Y)/Z
(XA2)AY
XA(YAZ)
X*(-Y)
Two
consecutive
operators
must
be
separated
by
parentheses.
1.8.1.1
Integer
Division
And
Modulus
Arithmetic
-
Two
additional
operators
are-available
in Extended
and
Disk
versions
of
BASIC-SO:
Integer
division
and
modulus
arithmetic.
Integer
division
is
denoted
by
the
operands
are
rounded
to
integers
-32768
to
32767)
before
the division
quotient
is truncated
to an integer.
baCks lash
(')•
The
(must
be
in the
range
is performed,
and
the
For
example:
10\4
:I
2
25.68\6.99
•
3
The
precedence
of
integer
division
is
multiplication
and
floating
point
division.
Modulus
arithmetic
is denoted
by
the
operator
MOD.
It gives
the
integer
value
that
is
the
remainder
of an integer
division.
For
example:
10.4 MOO
4
=
2
(10/4=2 with
a remaL~der
2)
25.68
MOD
6.99
=
5
(26/7=3 with
a remainder
5)
The
precedence
of modulus
arithmetic
is
just
after
integer
di~lision.