get-sys
Purpose: Obtain data that describes the system.
get-sys \
environment <var name> | web-environment <var name> \
| os-name | os-version \
to [ define ] <variable>
System-describing variables can be obtained with get-sys statement and the result stored into <variable>. The following system variables can be obtained:
- "environment" returns the name of a given environment variable <var name> from the Operating System, such as in the following example, the HOME variable (i.e. the path to user's home directory):
get-sys environment "HOME" to define home_dir
Generally, environmental variable needs to be set before starting the vf program manager, or set during the program execution.
- "web-environment" returns the name of a given environment variable <var name> from the web server, such as in the following example, the QUERY_STRING variable (i.e. the actual query string from URL):
get-sys web-environment "QUERY_STRING" to define home_dir
Note that the same name can be used for both Operating System environment variable (the "environment" clause) and for Web Server environment variable ("web-environment" clause), hence two separate clauses for them.
- "os-name" is the name of Operating System.
- "os-version" is the version of Operating System.
Note that all the string values above should be treated as constants - do not change them as that may cause program to malfunction. If you want to alter any of these values, make a copy first (see
copy-string).
Examples
Get the name of the Operating System
get-sys os-name to define os_name
See also
System information (
get-sys )
SEE ALL (
documentation)