Numeric Operators; String Expressions; Relational Expressions - Sharp PC-1403 Operation Manual

Hide thumbs Also See for PC-1403:
Table of Contents

Advertisement

86
Relational Expressions
A
relational
expression
compares
two
expressions
and
determines
whether the
stated
relationship is
True
or
False.
The relational operators
are:
>
Greater
Than
>=
Greater
Than or
Equal To
Equals
<>
Not Equal To
<=
Less
Than or Equal
To
<
Less
Than
"15"
+
10
is
illegal
"15"
+
"10" is
"1510",
not
"25"
String Expressions
String expressions
are
similar to
numeric
expressions except
that there is only
one
string
operator - concatenation
(+).This is
the
same symbol
as used for
plus. When
used
with
a pair of
strings,
the+ attaches the
second
string
to the
end
of
the first string
and
makes one
longer
string.
You should
take care
in making
more complex
string
concatenations and
other
string
operations
because the
work
space
used
by the
computer
for
string calculations
is
limited
to
only 79
characters.
Note:
String
quantiti
e s and numeric
quantities
cannot be combined in the same
expression
unless
one
uses one
of
the functions
which convert
a stri
n
g
value
into
a
numeric value or vice
versa:
(A
*
B}"' 2
A(2,3)
+
A
(3,4)
+
5.0-C
(A/B)
*
(C+D)
A numeric expression
is
constructed in
the same way
that
you entered
compound
calcul
a
tor
operations.
Numeric
expressions
can
contain
any
meaningful
combination
of
numeric
constants,
numeric
variables,
and these numeric
operators:
Numeric Operators
The
computer
has
five numeric operators
.
These
are
the arithmetic operators
which
you
used when
exploring the use
of the computer
as
a
calculator in
Chapter
3:
+
Addition
-
Subtraction
*
Multiplication
I
Division
,,....
Power
Concepts and Terms of BASIC

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents