IBM 5110 Basic Introduction page 55

Table of Contents

Advertisement

C
;--,,'-~
,/
"
C ' ' ' ' ' ' , ' , ' , ,
c'
c
To include a remark in a program, you write a BASIC statement called
REM. It has a line number like any other BASIC statement. Following
the line number, you enter the letters REM followed by any remark
you want. Examples of REM statements are:
40 REM THIS PROGRAM COMPUTES BATTING AVERAGES
70 REM AT THIS POINT, PRINT OUT THE RESULTS
10 REM DENTBILL
You'll see other examples of REM statements as you go through this
manual.
You should now be ready to enter the program from the system
keyboard. To enter and execute the program, follow the instructions
below. Remember to press EXECUTE after each line is entered.
Instructions
Clear storage
Enter the statements
Run the program
Display Screen Shows
(I
0
~.:_:.i
0
j"vj
::~
D -,,- :::
o
0
(:<
0
F'
r:.:~
I
!"--.l-r rei;, J
(I
0
--i'
0
~::;r
()
p
Remember that the idea in this program, and any other programs you
write, is to break down what you want to do into logical sequential
steps. It may help to use this tactic: Ask yourself what is the very
first thing I have to do? What is the next? And so on. You can make
a list of what you have to do and then convert each item in the list to
a BASIC statement. Thus, you will always have a sequence of
statements that will solve the problem in an orderly step-by-step
fashion.
The dentbill program is not a typical program because it works on only
one set of data that is a part of the program. Most programs are
written to use many sets of data and use data that is not a direct part
of the program. Later program examples will explain this in detail.
How to Write a Program
51
C
;--,,'-~
,/
"
C ' ' ' ' ' ' , ' , ' , ,
c'
c
To include a remark in a program, you write a BASIC statement called
REM. It has a line number like any other BASIC statement. Following
the line number, you enter the letters REM followed by any remark
you want. Examples of REM statements are:
40 REM THIS PROGRAM COMPUTES BATTING AVERAGES
70 REM AT THIS POINT, PRINT OUT THE RESULTS
10 REM DENTBILL
You'll see other examples of REM statements as you go through this
manual.
You should now be ready to enter the program from the system
keyboard. To enter and execute the program, follow the instructions
below. Remember to press EXECUTE after each line is entered.
Instructions
Clear storage
Enter the statements
Run the program
Display Screen Shows
(I
0
~.:_:.i
0
j"vj
::~
D -,,- :::
o
0
(:<
0
F'
r:.:~
I
!"--.l-r rei;, J
(I
0
--i'
0
~::;r
()
p
Remember that the idea in this program, and any other programs you
write, is to break down what you want to do into logical sequential
steps. It may help to use this tactic: Ask yourself what is the very
first thing I have to do? What is the next? And so on. You can make
a list of what you have to do and then convert each item in the list to
a BASIC statement. Thus, you will always have a sequence of
statements that will solve the problem in an orderly step-by-step
fashion.
The dentbill program is not a typical program because it works on only
one set of data that is a part of the program. Most programs are
written to use many sets of data and use data that is not a direct part
of the program. Later program examples will explain this in detail.
How to Write a Program
51

Advertisement

Table of Contents
loading

Table of Contents