EasyManua.ls Logo

Sharp MZ-700 - 2.2.1 Constants

Sharp MZ-700
213 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2.2
An Outline of BASIC
2.2.1
Constants
A constant is a
number
or
string
of
characters which is written into a program, and which is used
by
that
program
as
it
is executed. Types
of
constants include numeric constants, string (character) constants,
and system constants. These are explained below.
Numeric constants
A numeric constant is a
number
which has a maximum
of
8 significant digits. The exponent
of
such
constants
must
be in
the
range from 10-
38
to
10
38
(the maximum range is
1.548437E-38
to 1.7014118E
+38).
(Exam
pies:)
-123.4
0.
789
3748.
0
3 . 7 E + 1 2 · · · · · · · · · · · · · · · · · · · · · 3 . 7 X
10
12
l
7 . 6 5
E-
9 · · · · · · · · · · · · · · · · · · · · · 7 . 6 5 X 1 o-
9
E indicates the exponent.
1
4.
8E9··········
··
········ ···· 1
4.
8X10
9
Hexadecimal numbers: Numbers can
be
specified in hexadecimal format only for direct memory
addressing with the LIMIT,
POKE, PEEK, and USR instructions (see pages 92 and 93), and are repre-
sented
as
four digits preceded
by
a dollar sign ($).
(Examples:)
L I
MIT
$BFFF
USR
C
$C
000.
X $ )
String constants
X$ represents a string variable.
String constants are letters and symbols between quotation marks which are included in programs
to
allow titles
or
messages
to
be
output
to the display screen or printer. The characters
11
4+9
11
appearing
on
page
17
are a character constant, and
not
a numeric constant. With BASIC, a string constant may consist
of
a maximum
of
255 characters. (Not including
quotation
marks which cannot be included in a string
constant.)
. (Examples:)
11
A
BCDEFG
11
" 1
234567891
0 "
DAT
A
AB
CD
E F G .
..
. ·. ·. ·. . . . . Quotation marks are
not
needed when string constants are
specified in a DATA statement; however, they may
be
used
if
desired.
------------------------------------------------------------------------21

Other manuals for Sharp MZ-700

Related product manuals