
Commands - 48
FIND
Command
SYNTAX: FIND argument
PURPOSE: Used to locate variables, keyw ords, and labels.
REMARK S: This is a useful tool especially in long programs. The variations described below:
FIND keyword This will list all the lines that contain the specified command or function
keyword. For example, FIND POKE
FIND . . Lists all lines that start with labels. It does not list lines where the label is
part of a GOSUB, etc. Executing FIN D GOSU B will list all instances of
a GOSUB.
FIND . . label This will list the subroutine that begins with a specific label name. FIND
will continue to list every line until it encounters the label symbol (..) or
RETURN.
FIND variable Lists the line of every instance of the var iable name. It w ill help locate
conflicting variables. For example, PIT and P AT have the fir st and last
letter, and the sam e length. If you execute FIND PIT, then lines with
PAT, PET, PIT, POT and P UT are also listed.
EXAMPLE: 10 MOTOR = 1
20 GOSUB . . confirm
30 PRINT “Motor OK”
40 DO
50 GOSUB .. current_test
60 UNTIL RUNAMPS > 5
70 OUT 35,43
80 COR = INP(35)
90 IF COR <= 176 THEN PRINT “Status OK”
200 . . confirm
210 CUR = INP(12)
220 IF CUR < 2 THEN F = 0 ELSE F = 1
230 RETURN
240 . .
300 . . current _test
310 RUNAMPS = 1.5*AIN(2)
320 RETURN
330 . .
>FIND RUNAMPS
Komentarze do niniejszej Instrukcji