Operators - Casio FX-890P Owner's Manual

Casio personal computer owner's manual
Table of Contents

Advertisement

5.6 Operators

The following are the operators used for calculations, which involves variables.
Operators
Arithmetic operators
Relational operators
Logical operators
String operator
Relational operators
Relational operations can be performed only when the operators are both strings or
both numeric values.
With strings, character codes are compared one-by-one from the beginning of the
strings. This is to say that the first position of string A is compared to the first position
of string B, the second position of string A with the second position of string B, etc.
The result of the comparison is based upon the character codes of the first difference
between the strings detected, regardless of the length of the strings being compared.
EXAMPLES:
STRING A
STRING B
ABC
ABC
ABCDE
ABC
XYZ
ABCDE
A result of -1 is returned when the result of a relational operation is true (condition
met), while 0 is returned when the return is false (conditions not met)
EXAMPLE:
10 PRINT 10>3
20 PRINT 7>1
30 PRINT "ABC"=3XYZ"
40 END
Signs
Addition
Subtraction
Multiplication
Division
Power
Integer division
Integer remainder of integer division
Equal to
Does not equal
Less than
Grater than
Less than or equal to
Grater than or equal to
Negation
Logical product
Logical sum
Exclusive OR
Concatenation
RESULT
ABC
A=B
A<B
XYZ
A<B (character code for A less than that for X)
A>B (character code for X greater than that for A)
-1 returned because 10>3 is true
0 returned because 7<1 is false
0 returned because ABC=XYZ is false
36
+,-
+
-
*
/
^
¥
MOD
=
<>, ><
<
>
=>, <=
=>, >=
NOT
AND
OR
XOR
+

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Z-1grZ-1

Table of Contents