Programmed Cursor Control - Commodore PET 2001 Series Introduction Manual

Hide thumbs Also See for PET 2001 Series:
Table of Contents

Advertisement

If you wish to insert characters within a statement line, position the
cursor over the first character to be shifted to the right.
press
with the
key. If the new spaces increase line length to
greater than 40 spaces, a space will open up between the line being
edited and the next program line, and the characters to the right of
the insertion will move into the opened space. This is difficult to
show on paper, so just follow the instructions and watch the
result on your screen.
I . Type this program
10 PRINT "NOW IS THE TIME TO"
20 PRINT "THE END"
2. List the program
3. Move the cursor to the letter T in the word TO in statement 10.
4. Hold the
key and press the
(Here's where the screen will show a space being opened between
statement lines)
5. Type
FOR ALL GOOD MEN T
6. Press
7. LIST the program again
Using Direct Cursor Control while coding a string literal:
To edit a string literal, such as a print message or a data statement, the
user must press the
key and leave the statement line. A
RETURN
literal cannot be edited (except for character deletion and retyping)
while it is being originated, because all cursor controls except delete
and insert are programmable. The user must leave the statement line via
a carriage return, then move the cursor back to the offending
character and retype. Furthermore, to program cursor controls within
the string after having left the line, the user must use
18
key 17 times
the
function to open up spaces into which he can then type
INSERT
I
the appropriate control character.
The user can, of course, close the quotes, and thereby signal PET
that he is through with the literal message. However, once the second
quote mark has been typed, PET will no longer recognize cursor
movement as a part of created code, and the cursor will move accord-
ing to the Function represented by the key pressed.
II. PROGRAMMED CURSOR CONTROL
The cursor movement is executed during a program run. It is
part of a PRINT statement and has been enclosed within
quotation marks.
Function
CURSOR UP CURSOR
DOWN CURSOR LEFT
CURSOR RIGHT CLEAR
SCREEN HOME
CURSOR INSERT
CHARACTER*
DELETE CHARACTER*
REVERSE FIELD
RESET REVERSE'
*The INSERT and DEL ETE f unctions are not programmable. Use
CHR S (20) to delete during program run and CHR S (148) to
insert during program run.
PET uses the quotation mark to signal the beginning of a string literal,
as in a DATA or PRINT statement. When attempting to edit a program
line, the User should be aware that if PET sees an opening quote, it
will consider all cursor movement instructions as part of the
string.
19

Advertisement

Table of Contents
loading

Table of Contents