Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Wildcard Window Wrinum X.509 Xmldom Xml_ent Zip
Libraries
Environment Source Code
 previous   up   next 

Function Summary
array string
argv (PROGRAM)
Return the argument vector of the program as array of strings.
string
name (PROGRAM)
Returns the name of the program without path and extension.
string
path (PROGRAM)
Return the absolute path of the program.
string
dir (PROGRAM)
Returns the absolute path of the directory containing the program.
string
file (PROGRAM)
Returns the filename of the program without path.
string
getenv (in string: name)
Determine the value of an environment variable.
void
setenv (in string: name, in string: value)
Add or change an environment variable.
array string
environment
Returns the list of environment variable names as array of strings.

Function Detail

argv

const func array string: argv (PROGRAM)

Return the argument vector of the program as array of strings. The name of the program is not part of the argument vector.

Returns:
an array of strings containing the argument vector.

name

const func string: name (PROGRAM)

Returns the name of the program without path and extension. The name returned by name(PROGRAM) is the same for interpreted and compiled programs. The function name(PROGRAM) does not follow symbolic links. It determines, with which name a program was called. When several symbolic links refer to one program name(PROGRAM) returns the name of the symbolic link.

Returns:
the name of the program.

path

const func string: path (PROGRAM)

Return the absolute path of the program. For an interpreted program this is the absolute path of the source file. For a compiled program this is the absolute path of the executable. The function path(PROGRAM) does follow symbolic links.

Returns:
the absolute path of the program.

dir

const func string: dir (PROGRAM)

Returns the absolute path of the directory containing the program. The function dir(PROGRAM) allows placing configuration data in the directory of the program. The function is based on path(PROGRAM).

Returns:
The absolute path of the directory containing the program.

file

const func string: file (PROGRAM)

Returns the filename of the program without path. The function is based on path(PROGRAM).

Returns:
The filename of the program.

getenv

const func string: getenv (in string: name)

Determine the value of an environment variable. The function getenv searches the environment for an environment variable with the given name. When such an environment variable exists the corresponding string value is returned.

Returns:
the value of an environment variable or "", when the requested environment variable does not exist.
Raises:
MEMORY_ERROR - Not enough memory to convert name to the system string type or not enough memory to represent the result string.

setenv

const proc: setenv (in string: name, in string: value)

Add or change an environment variable. The function setenv searches the environment for an environment variable with the given name. When such an environment variable exists the corresponding value is changed to value. When no environment variable with the given name exists a new environment variable name with the value value is created.

Raises:
MEMORY_ERROR - Not enough memory to convert name or value to the system string type.
RANGE_ERROR - name or value cannot be converted to the system string type or a system function returns an error.

environment

const func array string: environment

Returns the list of environment variable names as array of strings.

Returns:
the list of environment variable names.
Raises:
MEMORY_ERROR - Not enough memory to create the result.


 previous   up   next