Using HP Instrument BASIC
Other Basic Features of IBASIC
COM Blocks.
COM blocks are used by the subprogram to communicate with the main
program or with other subprograms.
If you create subprograms and want to use common variables between main
program and subprograms, you should use COM blocks.
Refer to the above example.
In the main program, line 1 declares that the
Data
array will be a COM array.
Then, the main program assigns values to this array. Line 220 species that
the subprogram
Save_data
will also use the
Data
array.So,
Data
array of
main program can be operated on in the
Save_data
subprogram.
1-23