Casio PB-100 Instruction Manual page 30

Table of Contents

Advertisement

Furthermore, a character string is a group of characters which is enclosed in quotation
marks such as "123". This is not a numerical value. In other words, "123" just happens
to be 1 and 2 and 3 in sequence and is considered the same as "ABC". A character
variable is made by attaching a "$" to a regular variable (A, B, X, Y, etc.). These can be
freely selected from within this range.
E x a m p l e : A $ . B $ , C $ , X $ , Y $
Comparison or addition of each character variable is possible but other operations
such as subtraction, multiplication and division cannot be performed.
Example: If A$ = "123" and B$ = "456"
As a result of C$ = A$ + B$. C$ becomes "123456".
(For C$ = B$ + A$, C$ becomes "456123".)
A character variable can contain up to 7 characters.
Also, in addition to these character variables, there is also an exclusive character
v a r i a b l e .
This exclusive character variable is "$" and can contain up to 30 characters.
E x a m p l e : $ = M 2 3 4 5 6 7 8 9 0 A B C D E F G '
Since this exclusive character variable can use a character function (MID function)
which will be explained later, it is much more convenient than other character variables.
• Numerical variables and character variables which contain the same letter cannot be
used at the same time.
N u m e r i c a l v a r i a b l e A — i
. . . . - C a n n o t b e u s e d a t t h e s a m e t i m e .
C h a r a c t e r v a r i a b l e A $ - J
Since numerical variables and character variables use the same memory, they cannot
be used at the same time.
5 - 2 - 2 S u b s t i t u t i o n S t a t e m e n t s
BASIC substitution statements are in the following format.
Variable = numerical expression
In a BASIC substitution statement, the right side which contains addition, subtraction,
multiplication or division is called a "numerical expression".
E x a m p l e : y = 2 * X - F 3
The "25|cX+3" on the right side is a numerical expression.
The does not mean "equal", it means "substitute".
In V= 2'l'X+3, the left side is the variable and the right side is the numerical expression.
In other words, the meaning is different from normal mathematics where "the left side
(V) and the right side (2*X+3) are equal".
It means "input the operation result of the right side (2*X+3) into the left side (V)".
It may be easier to understand by thinking of V = 2 *X+3 as Y ■<- 25)«X+3.
- 2 9 -

Advertisement

Table of Contents
loading

Table of Contents