The calculator includes also the logical operator SAME. This is a non-standard
logical operator used to determine if two objects are identical. If they are
identical, a value of 1 (true) is returned, if not, a value of 0 (false) is returned.
For example, the following exercise, in RPN mode, returns a value of 0:
Please notice that the use of SAME implies a very strict interpretation of the
word "identical." For that reason, SQ(2) is not identical to 4, although they
both evaluate, numerically, to 4.
Branching of a program flow implies that the program makes a decision among
two or more possible flow paths. The User RPL language provides a number of
commands that can be used for program branching. The menus containing
these commands are accessed through the keystroke sequence:
This menu shows sub-menus for the program constructs
The program constructs IF...THEN..ELSE...END, and CASE...THEN...END will
be referred to as program branching constructs. The remaining constructs,
namely, START, FOR, DO, and WHILE, are appropriate for controlling repetitive
processing within a program and will be referred to as program loop
constructs. The latter types of program constructs are presented in more detail
in a later section.
'SQ(2)' ` 4 ` SAME
„°@) @ BRCH@
p XOR q