Program Editing

As with any BASIC, PRO/5 arranges lines in a program by line number. Any time you store a line in a program it is placed in proper sequence with the other lines.

To

Do this

Examine the program.

Use the LIST verb to display all or part of the program on the terminal screen. To list the whole program, type LIST. To display part of the program, type LIST and indicate the first and last line to list. For example:

LIST 1000,2000

List the program on the printer.

The LIST verb may also be used to output a program listing to destinations other than the display,( i.e., a printer or a disk file).

Add a new line.

Type a line with a unique line number. PRO/5 will automatically insert the line into the program at the point determined by the line number.

Replace an existing line.

Enter the same line number with the new information. The existing version will be overwritten.

Delete an existing line.

Type the line number.

Delete a range of lines.

Use the DELETE verb indicating the desired range to delete. For example, the following statement will delete all lines between and including lines 1000 and 2000:

DELETE 1000,2000

Append information to an existing line.

Type the line number, followed by a colon (:),followed by the new information.

Save a program to disk.

See the SAVE verb.

Retrieve a previously saved program from disk.

See the LOAD verb.

See the DELETE, EDIT, MERGE, and RENUM verbs for additional editing information.

If program execution was interrupted, you may freely edit the program before continuing execution. This is a significant advantage of PRO/5 over some other BASICs because they do not allow continuation after editing. However, you cannot edit any line containing an active GOSUB , WHILE, or FOR; or a statement with an error pending a RETRY (a line with an untrapped error may be edited).

Every program has an "invisible" END statement created automatically by PRO/5 at line 65535. This line will not be shown when LISTing the program. It is there to stop program execution in case the programmer forgot to use an END or STOP statement.