Skip to content

GET_ENV_STRING ​

GET_ENV_STRING returns the value of an environment variable.

Syntax ​

leo-grammar
CC "Core" GET_ENV_STRING envvar:strValue .

#--> RESULT envstr:strValue
CC "Core" GET_ENV_STRING envvar:strValue .

#--> RESULT envstr:strValue

Parameters ​

  • envvar (strValue) - the name of the environment variable

Returns ​

  • ecode (intValue) - contains the error code or is 0 in case of success.
  • envstr (strValue) - the value of the variable.

Details ​

In a Windows System Shell, all environment variables can be displayed with the command SET

See Also ​

SET_ENV_STRING

Examples ​

asc
CC "Core" debug GET_ENV_STRING envvar:("userprofile")
CC "Core" debug GET_ENV_STRING envvar:("userprofile")

Gets the path for the enviornmetn variable %userprofile%

Versions and Changes ​

Available since ADOxx 1.3