Getting Started-The Print Command; Printing Numbers - Commodore 128D User Manual

Hide thumbs Also See for 128D:
Table of Contents

Advertisement

Getting Started—
The PRINT
Command
3.
Be careful with punctuation marks. Commas, colons and semi
colons also have special properties, explained later in this
section.
4.
Always press the RETURN key (indicated in this Guide by
hLIUhN 1) after completing a numbered line.
5.
Never type more than 160 characters in a program line. Remem
ber, this is the same as four full screen lines in 40-column format,
or two full screen lines in 80-column format. See Section 8 for
more details on 40- and 80-column formats.
6.
Distinguish clearly between the letter I and the numeral 1 and
between the letter 0 and the numeral 0.
7.
The computer ignores anything following the letters REM on a
program line. REM stands for REMark. You can use the REM
statement to put comments in your program that tell anyone list
ing the program what is happening at a specific point.
8.
Never type commands to the computer with "shifted" charac
ters. The computer only understands "unshifted" characters.
Follow these guidelines when you type the examples and programs
shown in this section.
The PRINT command tells the computer to display information on the
screen, You can print both numbers and text (letters), but there are
special rules for each case, described in the following paragraphs.
Printing Numbers
To print numbers, use the PRINT command followed by the num
bers) you want to print. Try typing this on your Commodore 128:
PRINT 5
Then press the RETURN key. Notice the number 5 is now displayed
on the screen. Now type this and press RETURN:
PRINT 5,6
In this PRINT command, the comma tells the Commodore 128 that
you want to print more than one number. When the computer finds
commas in a string of numbers in a PRINT statement, each number
that follows a comma is printed starting in either the 11th, 21st or
31st column on the screen, depending on the length of each number.
If the previous number has more than 7 digits, the following number
is moved to the next starting position, 10 columns to the right. The
C128 always leaves at least 3 spaces between numbers which are
u
u
u
u
u
O
u
o
28
USING C128 MODE—Getting Started in BASIC

Advertisement

Table of Contents
loading

Table of Contents