4MELFA-BASIC IV
Operators
4-150
4.7 Operators
The value's real number or integer type do not need to be declared. Instead, the type may be forcibly con-
verted according to the operation type. (Refer to
.) The operation result data type is as follows
according to the combination of the left argument and right argument data types.
Example) Left argument Operation Right argument Operation results
15 AND 256 15
(Numeric value type) (Numeric value type) (Numeric value type)
P1 * M1 P2
(Position type) (Numeric value type) (Position type)
M1 * P1
(Numeric value type) (Position type) Description error
Table 4-11:Table of data conversions according to operations
Reversal: Sign reversal, Negate: Logical negate, Substitute: Substitute operation, Remainder: Remainder
operation, Comparison: Comparison operation, Logic: Logical Operation (excluding logical negate).
Left argument
type
Operation
Left argument type
Character string
Numeric value
Position
Joint
Integer
Real number
Character
string
Substitution=
Ad
Comparison (Compari-
son operators)
Character string
Character string
Integer
-
-
-
-
-
-
-
-
-
-
-
-
Integer
Ad
Substract -
Multiplication *
Division /
Integer division \
Remainder MOD
Exponent ^
Substitution =
Comparison (Compari-
son operators)
Logic (Logic operators)
-
-
-
-
-
-
-
-
-
-
-
Integer
Integer
Integer
Integer
Integer
Integer
Integer
Integer
Integer
Integer
Real number
Real number
Real number
Real number
Integer
Integer
Integer
Integer
Integer
Integer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Real number
Ad
Substract -
Multiplication *
Division /
Integer division \
Remainder MOD
Exponent ^
Substitution =
Comparison (Compari-
son operators)
Logic (Logic operators)
-
-
-
-
-
-
-
-
-
-
Real number
Real number
Real number
Real number
Integer
Integer
Integer
Integer
Integer
Integer
Real number
Real number
Real number
Real number
Integer
Integer
Real number
Real number
Integer
Integer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Position
Ad
Substract -
Multiplication *
Division /
Integer division \
Remainder MOD
Exponent ^
Substitution =
Comparison (Compari-
son operators)
Logic (Logic operators)
-
-
-
-
-
-
-
-
-
-
-
-
Position
Position
-
-
-
-
-
-
-
-
Position
Position
-
-
-
-
-
-
Position
Position
Position
Position
-
-
-
Position
-
-
-
-
-
-
-
-
-
-
-
-
Joint
Ad
Substract -
Multiplication *
Division /
Integer division \
Remainder MOD
Exponent ^
Substitution =
Comparison (Compari-
son operators)
Logic (Logic operators)
-
-
-
-
-
-
-
-
-
-
-
-
Joint
Joint
-
-
-
-
-
-
-
-
Joint
Joint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Joint
Joint
-
Joint
-
-
-
Joint
-
-
Right argument
only (Single
arugument)
eversal -
Negate NOT
-
-
Integer
Integer
Integer
Integer
Position
-
Joint
-