the I INSERT function to open up spaces into which he can then type 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 quota tion marks.
If you wish to insert characters within a statement line, position the cursor over the first character to be shifted to the right. press Function with the key. If the new spaces increase line length to CURSOR UP CURSOR 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. DOWN CURSOR LEFT CURSOR RIGHT CLEAR I . Type this program SCREEN HOME 10 PRINT "NOW IS THE TIME TO" 20 PRINT "THE END" CURSOR INSERT 2. List the program CHARACTER* 3.
Move the cursor to the letter T in the word TO in statement 10. 4. Hold the key and press the key 17 times DELETE CHARACTER* (Here's where the screen will show a space being opened between statement lines) REVERSE FIELD 5. Type FOR ALL GOOD MEN T 6. Press RESET REVERSE' Using Direct Cursor Control while coding a string literal: 7. LIST the program again To edit a string literal, such as a print message or a data statement, the user must press the RETURN key and leave the statement line. A 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 *The INSERT and DELETE functions are not programmable. Use CHRS (20) to delete during program run and CHRS (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 18