5
121 NEXT
130/ PRINT “(SHIFT/CLR/HOME)”:GOTO 110/
COMMAND : RENUMBER 20/0/ ,3 (RETURN)
TYPE : LIST (RETURN)
DISPLAY : 20/ 0/ REM RENUMBER
COMMAND
20/ 3 PRINT “HELLO I’M VIC”
20/ 6 FOR L = 1 TO 10/ 0/ 0/
20/ 9 NEXT
212 PRINT“(SHIFT/CLR/HOME)”:
GOTO 20/ 3
2.4.4 DELETE
FORMAT : DELETE (sln) – (fln)
PURPOSE : To delete program lines from VIC’s
memory.
DELETE operates on a line range in the same
way as the BASIC command LIST. The various
formats of the DELETE command are listed
below:
DELETE (ln) Deletes line (ln) only
DELETE (sln) – (fln) Deletes all lines between (sln)
and (fln)
DELETE – (fln) Deletes all lines from the start
of the program to line (fln)
DELETE (sln) – Deletes all lines from line
(sln) to the end of the
program.
EXAMPLE : To delete the first two lines from
the following program:
10/ REM DELETE COMMAND
20/ REM ONE OF THE MANY
30/ REM USEFUL VIC 20/
40/ REM PROGRAMMER’S AID
50/ REM COMMANDS
COMMAND : DELETE – 20/ (RETURN)
TYPE : LIST (RETURN)
DISPLAY : 30/ REM USEFUL VIC 20/
40/ REM PROGRAMMER’S AID
50/ REM COMMANDS
RESULT : Lines 10/ and 20/ have been
removed from the program
EXAMPLE : To delete lines 30/ and 40/ of the
same program:
COMMAND : DELETE 30/ – 40/ (RETURN)
TYPE : LIST (RETURN)
DISPLAY : 50/ REM COMMANDS
RESULT : Lines 30/ to 40/ have been removed
from the program.
2.4.5 FIND
FORMAT : FIND (BASIC code), (sln) – (fln)
or : FIND “(character string)”,(sln) – (fln)
or : FIND (character), (sln) – (fln)
PURPOSE : To search the program for a given
BASIC code or character string and
display the program line(s) where
it appears.
FIND operates on a range of lines in the same
way as a LIST command. Its various formats are
listed below:
FIND (char), – (fln) FINDs from the begin-
ning of the program to
line (fln).
FIND (char),(sln) – FINDs from line (sln) to
the end of the program.
FIND (char),(sln) – (fln) FINDs from line (sln) to
line (fln).
where (char) indicates a BASIC code, character
or character string to be located.
FIND searches for a character or a BASIC
code in a program and displays all lines that
contain that character or BASIC code except
those lines where the character code is
enclosed in quotation marks. This includes all
occurrences in REM statements. If you do not
wish to include REM statements, enter REM with
a set of quotation marks immediately following,
e.g. REM “REMARK”. In this way, items in REM
statements will only be displayed to the screen if
a search is made for a character enclosed in
quotation marks, i.e. a character string.
If a character string search is made, the FIND
command will display all the lines where the
string is contained within quotation marks.
Holding down the CTRL key will slow down
the rate at which program lines are displayed to
the screen. The STOP key will abort the FIND
command.
EXAMPLE : To find the character in the
following program:
10/ REM FIND COMMAND
20/ PRINT “ABCDEFGH VERTICALLY”
30/ A$ = “ABCDEFGH”
40/ FOR C = 1 TO 8
50/ PRINT MID$(A$,C,1)
60/ PRINT “– – – – – – – – –“
70/ NEXT C
80/ REM “CONTINUE
COMMAND : FIND C (RETURN)
DISPLAY : 10/ REM FIND COMMAND
40/ FOR C = 1 TO 8
50/ PRINT MID$(A$,C,1)
70/ NEXT C
RESULT : Every program line containing a
C will be displayed to the screen.
EXAMPLE : To FIND the character string
“ABCD” in the same program: