Chapter5 Programming The Computer; Programs; Basic Statement; Line Numbers - Sharp PC-1403 Operation Manual

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

Advertisement

91
Each line of
a program
must
have
a
unique line
number-any
integer between
1
and
65279. Line
numbers are the
reference
for
the computer. They tell
the computer
the
order
in which
to
execute
the
program.
You
need
not
enter
lines
in
sequential
order
(although if
you are
a
beginning
programmer,
it
is probably
less confusing
for
you to
do
so).
The computer
always
begins
execution
with
the lowest line
number and
moves
sequentially through the lines
of
a
program in
ascending
order.
When
programming, it
is
wise to
allow increments in your line
numbering
(10, 20,
30,
...
10, 30,
50,
etc.). This enables
you
to
insert
additional
lines
if
necessary.
CAUTION: Do
not
use the same line numbers in different programs. If
you use the
same line
number,
the oldest line with
that number
is
deleted
when you
enter
the new
line.
line Numbers
The
computer interprets
instructions according to
a
predetermined
format.
This format
is called a statement.
You always enter BASIC statements
in
the
same pattern.
Statements must
start
with
a line number:
H1l: PRINT
"HELLO"
20:
END
30:
-BASl~t~
~
-
- -
--
A program
consists of a
set
of
instructions to the
computer.
Remember the
computer
is
only a
machine. It will perform the exact operations
that you
specify.
You, the
programmer, are
responsible
for
issuing
the correct
instructions.
Programs
In the
previous chapter,
we examined
some of the concepts
and
terms
of
the
BASIC
programming
language.
In this
chapter,
you
will
use these
elements
to create
programs on the computer. Let us
reiterate,
however, that this is
not
a
manual on
how
to program in
BASIC.
What
this
chapter will
do
is to
familiarize you
with
the
use of
BASIC
on your
computer.
CHAPTERS
.
PROGRAMMING THE COMPUTER
Programming the Computer

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents