Default variable types set up in the original program via defint, defsng, defdbl, and defstr are unknown to the new program. Similarly, functions defined with def fn are defined only in the source file in which the definitions occur.
Open files remain open across a chain operation.
defint i, k dim a$(25, 25) common a$() for i = 0 to 25 for k = 0 to 25 print i, k, spc(10) a$(i, k) = str$(i) print a$(i, k) next k next i chain "code2"In the example above, the array a$() is declared as (unlabelled) common. This allows the values of a$() at the time of the chain operation to be passed to the program "code2" in order to serve as initialization values for a similar array that it also declares as common. Here is what the source for "code2" might look like:
dim a$(25, 25) common a$() print for i = 0 to 25 print a$(i, 1) next i end
Because the compiler has no knowledge of modules other than the one it is compiling, the unlabelled common data preserved across a chain is limited to that declared in the main module.
from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber