On 09/20/2015 09:00 AM, Peter Coghlan wrote:
CHAIN <filename> is roughly equivelant to LOAD
<filename> followed by
RUN. Unlike LOAD, CHAIN can be issued from a program so it can be
used for a kind of overlay where one program is run and then replaced
by another program when it completes. However, like LOAD (and RUN),
CHAIN also clears most variables so the amount of initialisation that
can be done in the first program is quite limited.
Some BASICs implement a type of COMMON (to borrow from FORTRAN) which
contains variables for communication between CHAINed program units. In
that respect, CHAINed programs behave much more like overlays, albeit
all as level (0,0). I'm not certain that any BASICs implement the
FORTRAN-style overlay hierarchy.
--Chuck