Make a series of small procedures and save them for merging with the basic program you are writing. These proc’s should be code you use more than once. Some examples;
DEF PROC window_11
REM explain proc
WINDOW #11,512,256,0,0
BORDER #11,5,0,7
RETURN
END DEF
This procedure will define a window with a border.
DEF PROC find_last_entry
FOR n=1 to m
INPUT #7,m$(n,1 to 300)
IF m$(n, 1 to 7)=' ' then m=
(n-1): n=501
NEXT n
RETURN
END DEF
This procedure will read a file until the last record is found. The record number is stored in n. The dimension is 300×500. The dimension and m must be defined and the file must have been opened either input or input/output.
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.