ENVIRONMENT.
In this case, the variable
name need not be a valid Rexx symbol.
On Unix-like systems environment variable names are case-sensitive.
Call VALUE "MYVAR", "FIRST" || "00"X || "SECOND", "ENVIRONMENT"
/* Given that an external variable FRED has a value of 4 */
share = "ENVIRONMENT"
say VALUE("fred",7,share) /* says "4" and assigns */
/* FRED a new value of 7 */
say VALUE("fred", ,share) /* says "7" */
/* Accessing and changing Windows environment entries */
env = "ENVIRONMENT"
new = "C:\EDIT\DOCS;"
say value("PATH",new,env) /* says "C:\WINDOWS" (perhaps) */
/* and sets PATH = "C:\EDIT\DOCS;" */
say value("PATH", ,env) /* says "C:\EDIT\DOCS;" */
.nil as the
newvalue. To delete the environment
variable "MYVAR" specify: value("MYVAR", .NIL, "ENVIRONMENT"). If you specify
an empty string as the newvalue like in
value("MYVAR", "", "ENVIRONMENT")
the value of the external environment variable is set to an
empty string which on Windows and Unix-like systems is not the same as deleting the
environment variable.