ProSoft Technology MVI56-BAS User Manual
Page 48

Using the Program Port (PRT1)
MVI56-BAS ♦ ControlLogix Platform
User Manual
BASIC Module (DB/BAS Compatible)
Page 48 of 234
ProSoft Technology, Inc.
December 13, 2011
10 FOR I = 0 TO 5
20 PRINT I
30 NEXT I
40 END
Ready
>
The LIST command allows you to see what you have done so far.
You can now execute the program using the RUN command:
Ready
>run
0
1
2
3
4
5
Ready
>
If you want to add a line in the middle of your program, select an unused line
number between the line numbers where you want to insert the line, and type in
the new line:
Ready
>list
10 FOR I = 0 TO 5
20 PRINT I
30 NEXT I
40 END
Ready
>25 p. "Hello World"
Ready
>list
10 FOR I = 0 TO 5
20 PRINT I
25 PRINT "Hello World"
30 NEXT I
40 END
Ready
>
If you want to remove a line from the program, type in that line number:
Ready
>list
10 FOR I = 0 TO 5
20 PRINT I
25 PRINT "Hello World"
30 NEXT I
40 END
Ready
>20
Ready
>list
10 FOR I = 0 TO 5
25 PRINT "Hello World"
30 NEXT I