StrExpr, and the environment variables, have the form "name=value" where name is the name of the variable and value is the value assigned to the variable. If the name given in the statement matches the name of an entry in the environment variable list, the entry is first deleted. Then if the value given in the statement is not empty, a new "name=value" entry is appended to the end of the environment variable list.
environ "ANIMAL=pig"Then we could change the value of ANIMAL to "frog" with the following statement:
environ "ANIMAL=frog"Finally, we could delete the variable ANIMAL altogether with the following statement:
environ "ANIMAL="The following program changes the user’s prompt and invokes a shell:
environ "PS1=% " print "Creating a shell..." shell print "Ending shell"The output of this program would look like the following if the user responds to the new shell with "exit":
$ a.out Creating a shell... % exit Ending shell $
from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber