Expressions And Operators; Arithmetic Operators - Sanyo MBC-550 Series User Manual

Table of Contents

Advertisement

Expressions and Operators
An operator is a symbol to show the operational method
(i.e. adding, subtracting, or comparing the date).
A
combination in which some number of data items are
related by operators according to syntactic rules is
called an expression.
One expression produces one
value as a result of the data operation performed, in
the order that the operators specify and the priority
of the operator.
We call that value, in this manual,
an evaluation result which naturally shall be either
numeric or string data.
ARITHMETIC OPERATORS
Arithmetic operators are divided into the following
eight types:
EXAMPLES
OPERATOR
A * B
*
Raise A to the Bth
power
Minus A
Multiply A by B
Divide A by B
Divide A by B, and
discard the decimal
part.
A MOD B Remainder of A div­
ided by B
(Both A and B are
rounded off to inte­
gers before being
divided.)
Add A and B
Subtract B from A
Raising to a power
(exponentiation)
Minus sign
Multiplication
Division
Integer division
1
-A
2
A * B
A / B
A \ B
*
3
4
/
\
5
6 MOD Remainder
Addition
Subtraction
A + B
A - B
7
+
8
3-18

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents