6
COMMAND : FIND “ABCD” (RETURN)
DISPLAY : 20/ PRINT “ABCDEFGH
VERTICALLY”
30/ A$ = “ABCDEFGH”
RESULT : Every line containing the character
string “ABCD” will be displayed
to the screen.
2.4.6 CHANGE
FORMAT : CHANGE (old code),(new code),
(sln) – (fln)
or : CHANGE (old string),(new string),
(sln) – (fln)
PURPOSE : To search for an existing BASIC
code or character string and
replace it with a new BASIC code or
character string.
If the character string to be modified is
enclosed in quotation marks, CHANGE will only
replace the matching character strings in the
program which themselves are bounded by
quotation marks. Note that in REM statements,
BASIC codes which are not enclosed in quotation
marks , for example 1∅
∅∅
∅ REM PRINT, will not be
changed by the command CHANGE
PRINT,PRINT #,10/0/ 0/ – 20/ 0/ 0/ .
CHANGE operates on a line range in the
same way as does the BASIC command list
and its various formats are given below:
CHANGE (oc),(nc), – (fln)
Search from the beginning of the program
to line (fln) replacing (oc) with (nc).
CHANGE (oc),(nc),(sln) –
Search from line (sln) to the end of the
program replacing (oc) with (nc).
CHANGE (oc),(nc),(sln) – (fln)
Search from line (sln) to line (fln) replacing
(oc) with (nc).
where oc refers to the old BASIC code or
character string and nc refers to the new BASIC
code or character string.
EXAMPLE : To change the character string
“ABCDEFGH” to “12345678” in
the preceding program:
COMMAND : CHANGE “ABCDEFGH”,
”12345678” (RETURN)
DISPLAY : 20/ PRINT “12345678
VERTICALLY”
30/ A$ = “12345678”
RESULT : All character strings
“ABCDEFGH” will be changed
to “12345678” and each line
where the CHANGE occurs
will be displayed to the screen.
2.4.7 EDIT
FORMAT : EDIT
PURPOSE : To change from PROGRAM mode
to EDIT mode.
The EDIT command gives easy access to twelve
program editing commands which are auto-
matically assigned to the function keys when the
cartridge is inserted into your VIC. (See section
2.3.2.)
You may type the word EDIT or press the CTRL
and F1 keys to enter the EDIT mode. The function
keys are then assigned the following commands:
NOTE: (RETURN) indicates a built-in carriage
RETURN following the command. This is
displayed on the screen as a reverse-field left-
arrow. (See section 2.4.9 to add a built-in
carriage RETURN.)
KEY 1, “LIST”
KEY 2, “AUTO“
KEY 3, “RUN (RETURN)”
KEY 4, “DELETE“
KEY 5, “FIND”
KEY 6, “CHANGE“
KEY 7, “TRACE (RETURN)”
KEY 8, “STEP (RETURN)“
KEY 9, “PROG (RETURN)”
KEY 10/ , “RENUMBER”
KEY 11, “MERGE”
KEY 12, “OFF (RETURN)“
EXAMPLE : To enter EDIT mode from
PROGRAM mode:
COMMAND : EDIT (RETURN)
DISPLAY : EDIT
RESULT : The function keys are now
assigned program editing
commands.
2.4.8 KEY
FORMAT : KEY
or : KEY number, “code”
PURPOSE : To list the commands assigned to the
function keys which will then allow
you to change their assignments.
KEY allows you to display the information
assigned to the function keys and then change
them if you wish. The function keys can represent
anything which facilitates program writing e.g.
a BASIC keyword, a graphic symbol, a number, a
character string, etc., or a combination of
these. The only restriction is that the information
assigned to any one key must be 10/ characters
long or less. By using the abbreviated form of
BASIC codes, e.g. ? for PRINT, you can
increase the amount of information you assign
to each key.