Atari 65XE Owner's Manual page 47

Hide thumbs Also See for 65XE:
Table of Contents

Advertisement

The comma acts like a tab. Each time the computer moves down to
the next line and prints CONGRATULATIONS!, it moves to the next tab
position. The result is a barber-pole effect. Remember to break the
loop with the
Semicolon: Computer Glue
A semicolon produces another kind of effect. List the program, change
the comma in line 110 to a semicolon, press
program:
LIST
110 PRINT "CONGRATULATIONS! ";
120 GOTO 110
RUN
The semicolon glues the PRINT statements together with no space in
between. To put some space between the words, go back and edit line
110 so that it looks like this:
110 PRINT"CONGRATULATIONS!
RUN
Colon: A Separator
The colon is a separator. It permits two instructions to be placed on
one line. Change the semicolon in line 110 to a colon and add the
PRINT statement below:
110 PRINT "CONGRATULATIONS!" : PRINT "YOU JUST WON THE
LOTTERY."
RUN
As you progress in your programming ability, conserving space in the
computer's memory becomes important. Consolidating commands on
one line with a colon is one way to help save free bytes of RAM
memory. To see how much memory is conserved, type the following
statement:
PRINT FRE (0)
The computer will answer with a number. Reprogram line 110 so that
the two PRINT statements take up two program lines:
110 PRINT "CONGRATULATIONS!"
115 PRINT "YOU JUST WON THE LOTTERY. "
PRINT FRE (0)
key.
";
42
, and run the

Advertisement

Table of Contents
loading

Table of Contents