Module Env Reference

OS environment variables

Constants

This section is empty.

Types

This section is empty.

Variables

This section is empty.

Procedures

PROCEDURE Count (): INTEGER;

Return the number of environment variables.

If Count() returns N, then you can call Get(x) with 0 <= x < N.

PROCEDURE Get (n: INTEGER; VAR s: ARRAY OF CHAR);

Puts in s the nth environment variable as a string containing a key, equal sign and possibly a value (i.e. 'PATH=/usr/bin').

n must be in range 0 <= x < N, where N is the result of Count().

PROCEDURE GetAppDir (VAR s: ARRAY OF CHAR);

Returns a full path to the application directory. That is the directory where the executable file of the currently running program resides.

It might not be logically possible to determine application directory in some cases on Linux/Unix systems.

PROCEDURE GetByName (name: ARRAY OF CHAR; VAR val: ARRAY OF CHAR);

Puts in val the value of the environment variable with the given name.

If there is no such variable, puts an empty string in val.

PROCEDURE GetLang (VAR s: ARRAY OF CHAR);

Puts in s the language of the user interface (the OS) as a lower case 2-character string.

Examples: 'en', 'ru'.