To allow the user to modify parameters in GW-BASIC's environment string table. This may be to change the path parameter for a child process, (see ENVIRON$, SHELL, and the MS-DOS utilities PATH command), or to pass parameters to a child by inventing a new environment parameter.
string is a valid string expression containing the new environment string parameter.
stringmust be of the following form
where parmidis the name of the parameter such as PATH.
parmidmust be separated from text by an equal sign or a blank. ENVIRON takes everything to the left of the first blank or equal sign as the parmid; everything following is taken as text.
textis the new parameter text. If textis a null string, or consists only of a single semicolon, then the parameter (including parmid=) is removed from the environment string table, and the table is compressed. textmust not contain any embedded blanks.
If parmiddoes not exist, then stringis added at the end of the environment string table.
If parmiddoes exist, it is deleted, the environment string table is compressed, and the new string is added at the end.
Assuming the environment string table is empty, the following statement will create a default path to the root directory on Disk A:
If your work subdirectory were john, you would be able to get DEBUG from the root.
A new parameter may be added:
The environment string table now contains
The path may be changed to a new value:
ENVIRON "PATH=A:\SALES; A:\ACCOUNTING"
The path parameter may be appended by using the ENVIRON$ function with the ENVIRON statement:
All Frank Sinatra recordings, All Beatles albums, All solo albums from John Lennon, Paul McCartney, George Harrison and Ringo Starr, All Beatles songs, List of Platinum selling albums, Database with hits from 1950 to 1999.
Sought after DLL files, Nutworks magazine (retro), Worldwide ISO and TLD codes, File extensions database, The Hackers dictionary, Free software for the Atari, Amiga and Macintosh, Nokia smartphone, PocketPC, List of all BASIC programming language commands, List of all DOS commands, Free Advanced Bash-Scripting Guide (Linux-Unix)