Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Group: Information and Control
See also: library setenv

Function: getenv
Description: getenv reads the content of an environment variable set by the program or by the ini-file.

Usage: x = getenv (envname) or getenv()
Input:
envname string, name of the environment variable envname can take the following values:
"system"
internal name of the operating system
"os"
operating system
"build"
internal build number
"builddate"
internal build date
"buildtype"
running version (standalone, server, batch)
"logfile"
directory containing logfile
"machineeps"
machine precision epsilon, smallest value in floating point arithmetic recognized as bigger than zero
"outheadline"
format of the headline of an array in the standard output
"outlayerline"
format of the layerindex of an array in the standard output
"outlineno"
format of the line number of an array in the standard output
"outmaxdata"
maximum number of data items in the output window
"outputformat"
format of numerical output. Syntax like C's printf
"outputstringformat"
format of textual output. Syntax like C's printf The variables below tell XploRe where to read and write data, libraries, programs, help and temporary files:
"xpl4home"
home directory of user
"xpl4data"
directory for loading data, defined by the user
"xpl4lib"
directory for loading libraries, defined by the user
"xpl4dll"
directory for loading a dynamically linked library (used by dlopen), defined by the user
"xpl4help"
directory for loading help system, defined by the user The xpl4out* variables define the place where XploRe writes the data (written by the command write) and all other files:
"xpl4outdata"
directory for writing data
"xpl4outhelp"
directory for user taylored APSS (not used)
"xpl4outprog"
directory for writing programs
"xpl4outtemp"
directory for writing temporary files The xpl4net* variables are used to get information over the Internet. These variables cannot be modified from within XploRe:
"xpl4nethome"
home directory of XploRe
"xpl4netlib"
directory of XploRe for loading libraries
"xpl4netdata"
directory of XploRe for loading data
"xpl4nethelp"
used to find a help system, if no local help system is found
"xpl4netdll"
directory of XploRe for loading a dynamically linked library
"xpl4netprog"
directory for loading programs
"xpl4nettemp"
directory for loading temporary files The xpl4sys* variables are used to find the locally installed libraries, data and programs which come with XploRe. Normally the system administrator will set these variables on the directory where XploRe is installed. These variables cannot be modified from within XploRe:
"xpl4syshome"
home directory of XploRe
"xpl4syslib"
directory for loading libraries
"xpl4sysdata"
directory for loading data
"xpl4syshelp"
directory for loading locally instaled help system
"xpl4sysdll"
directory for loading a dynamically linked library
"xpl4sysprog"
directory for loading programs
"xpl4systemp"
directory for loading temporary files
"browser"
WWW browser started from XploRe (under Windows this is the default browser)
"startup"
name of the startup file
"port"
portnumber used (only XploRe server)
"maxClients"
maximal number of clients (only XploRe server)
Output:
x string, text containing the value of the environment

Note:

Example:
getenv()

Result:
returns all existing environment variables
Example:
getenv("xpl4home")
getenv("outputformat")

Result:
prints:
text containing the value of the environment variable "xpl4home";
text containing the value of the variable "outputformat" that controls
the format of numerical outputs (default is "% 8.5lg")



(C) MD*TECH Method and Data Technologies, 05.02.2006