Radio Shack Pro-2032 Specifications Page 31

  • Download
  • Add to my manuals
  • Print
  • Page
    / 72
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 30
How
to
Count
the
Number
of
Steps
A command or a
function
command in a program
uses
1 step.
A line number (numerical values
from
1 through 9999)
uses
2
steps.
Example:
1 INPUT A
Im--------------------------------
5 steps
'--'
\ I
'~
'---'
2 I
10
8 =
SIN
A
E··------------------------------
7 steps
'--J
'---JL...J~
I...-.J
'--'
2 I I I I
100
PRINT
"-----'
\ }
2
\\
8="
; B
LED
------------···10 steps
,
'--..I
L..J
'----'
4 I I
Total 22 steps
5-2-1 Constants and Variables
Characters which
can
be
used
in BASIC
are
capital letters (A through
Z)
and numbers
(0
through 9) and certain special characters
such
as
symbols, etc.
Constants
The characters
used
in BASIC
are
capital letters
(A
through Z), and numbers
(0
through
9),
and certain special characters
such
as
symbols.
Example: S =
1tr
2
becomes S = 1! *Rf 2
2
is
the constant.
Variables
A variable
is
a single capital letter
(A
through
Z)
or
a single capital letter
with
"$"
attached (character variable).
Variables
are
also numerical values which
are
used
in a program. They
are
used
during
execution
to
make inputs
from
the keyboard
or
to
substitute calculation results which
were
initially
unknown.
Example: S =1Cr
2
becomes S =
7C
*Rf 2
R
is
the variable.
Example: Y = 2 * X t 2 + 3 * X + 4
V~riable
I
va~iable
I
con~ant
I
Co~stant
Constant
Constant Variable
In other words, algebraic terms are "variables" and constant numbers
are
"constants".
In addition, there
are
character constants and character variables.
A character constant
is
a character string which
is
written
directly. A character string
is
a group
of
characters which
is
enclosed in quotation marks such
as
"123"
or
"ABC".
-28-
Page view 30
1 2 ... 26 27 28 29 30 31 32 33 34 35 36 ... 71 72

Comments to this Manuals

No comments