Group: | Information and Control |
See also: | getenv library |
Function: | setenv | |
Description: | setenv sets one of the environment variables described below to a desired value |
Usage: | setenv (envname, newval) | |
Input: | ||
envname | string, name of the environment variable
envname can take the following values:
| |
newval | string, new value for the desired environment variable (e.g., name of a directory) |
2. The command getenv() shows all environment variables and respective values.
3. The following environment variables
os (Operating system) system (Internal name of the operating system) build* (Internal build number, date, type) machineeps (Machine precision epsilon)
xpl4home (Home directory of user)
xpl4nethome, xpl4net* (Home directory of XploRe and related directories)
xpl4syshome, xpl4sys* (Home directory of XploRe defined by administrator and related directories)
can NOT be changed by the command setenv but rather by editing the XploRe.ini file.
4. In this command, the backslash is coded as "\\", the newline as "\n" (Unix), "\r\n" (Windows) and the tabulator as "\t".
setenv("xpl4data", "/user/haerdle/project1/data")
data are read from /user/haerdle/project1/data
setenv("outheadline", "") x = normal(3,3,3) x
the array is displayed without the standard header "contents of x"
setenv("outputformat", "%10.2f") x = normal(3,3,3) x
numbers are printed rounded to two digits
setenv("outheadline", "") setenv("outlayerline", "") setenv("outlineno", "") x = normal(3,3,3) x
the array is displayed without the standard header "contents of x", without the array line number (e.g. "[1,]", etc.) and without the layer index (e.g."[,,1,1,1,1,1,1]", etc.)