Download Print this page

Commodore 64 User Manual page 53

Hide thumbs Also See for COMMODORE 64:

Advertisement

BRACKETS, COLON, AND SEMICOLON
/-s
5 M
'
"
C
''"am
t- '
USING THE BRACKETS [] KEYS
Two more keys that work a bit like
parentheses are the brackets keys. Though
they are used to enclose remarks in regular
sentences and character strings, they cannot
group numbers like parentheses in BASIC com
mands or in long arithmetic calculations. You
get the left and right brackets when you press
the colon or semicolon key while holding
down the SHIFT key. For instance, type this:
PRINT"[]"
Now press RETURN. The result looks a bit like
a cursor, doesn't it?
SCREEN 1
[/:KEY
What about the flip side of these two keys?
The left bracket is the colon when typed with
out the SHIFT key down. In addition to being
used as a punctuation mark, the colon is used
to allow more than one command to be
included on the same program line. (The com
mands are still executed separately, from left to
right) An example of this would be to take
the three separate commands used to send a
message to your printer. (Do not type these
commands—they are used for illustration only.)
OPEN4,4
CMD4
LIST
You could type all three commands on the
same line, like this:
OPEN4,4:CMD4±IST
and then, when the procedure is completed,
type the last two commands like this:
PRINT#4:CLOSE4
(The preceding commands work only if you
have a printer attached to your computer.)
SCREEN 1
The brackets symbols can be used in
sentences and within character strings.
LEFT BRACKET/COLON key
RIGHT BRACKET/SEMICOLON key
—*
51

Advertisement

loading

Related Products for Commodore COMMODORE 64

This manual is also suitable for:

Vic 20