Radio Shack Pro-2032 Specifications Page 32

  • Download
  • Add to my manuals
  • Print
  • Page
    / 72
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 31
A character variable
is
not
a numerical value - although
it
may consist
of
numbers -
but
a variable which contains a character string. 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.).
Example:
AS,BS,CS,XS,
YS
Comparison
or
addition
of
each
character variable
'is
possible. Other operations
such
as
subtraction,
multiplication
and division, however, cannot
be
performed.
Example:
If
A$
=
"123"
and
B$
=
"456"
As a
resu
It
of
C$ =
A$
+
8$,
C$ becomes
"123456".
(For C$ =
B$
+ A$,
C$
becomes
"456123".l
A character variable
can
contain up
to
7 characters.
In
addition
to
these character variables, there
is
also
an
exclusive character variable.
The exclusive character variable
is
"$"
and
can
contain up
to
30 characters.
Example:
$=
"1234567890ABCDE
FG"
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
since
they
use
the
same
memory.
For example:
Numerical variable
A
J
.
Ch
. bl
A$
Cannot
be
used
at the
same
time.
aracter
varia e
5-2-2 Substitution Statements
BASIC substitution statements adhere
to
the
following
format:
Variable
-::
numerical expression
In a BASIC substitution statement,
the
right side which may contain addition, sub-
traction,
multiplication
or
division
is
called a "numerical expression".
Example:
Y=2*X
+3
In
y=
2*X+3,
the
left
side
is
the variable and the right side
is
the numerical expression.
The
"="
does
not
mean
"equal",
it
means
"substitute"-
In other words, the meaning
is
different
from
normal mathematics where
"the
left
side
(Y) and the right side
(2*
X+3) are equal"_
It
means
"input
the operation result
of
the right side
(2*X+3l
into
the
left
side
(V)".
It
may
be
easier
to
understand
by
thinking
of
Y = 2 *
X+3
as
Y
+-
2*X+3.
~29-
Page view 31
1 2 ... 27 28 29 30 31 32 33 34 35 36 37 ... 71 72

Comments to this Manuals

No comments