This is another A-Shell extension that functions something like the special $ information variables, except that their values may be set from within a BASIC program. Once set, they retain their value for the duration of that session (unless specifically over-written by a BASIC program). There are ten possible global DO file parameters, and they may be invoked on a command line using %0 through %9. The DO file processor substitutes these formal parameters for their values before passing them on to the DO file. For example, consider the command line:
XYZ ONE %3 TWO %0
Assuming that global parameter %3 had previously been set to "gee whiz" and global parameter %0 had previously be set to "humdinger", then this command would be processed as if it were:
XYZ ONE <gee whiz> TWO humdinger
"ONE" would be substituted for $0, "gee whiz" for $1, "TWO" for $2, and "humdinger" for $3.
There is no particular limit on the size of these variables, although there is limit of 200 characters on the length of any expanded command line.
To set global parameters, use XCALL MIAMEX as follows:
xcall MIAMEX, 79, status, g0, g1, g2, g3, g4, g5, g6, g7, g8, g9
The values of the variables g0 through g9 (all of them optional, all of them string or unformatted) will be plugged into the corresponding global parameters. Any of the parameters g0 through g9 that are not specified will cause the corresponding variable to be cleared. Status (F,6) will be returned as 0 for success, else error.
See the sample program MIAMEX.BAS in [7,376] for an example of setting and even retrieving these global DO parameters. (Although they were designed to be used with DO files, there is nothing stopping you from using them for holding and passing parameters amongst your own programs.)