HOST_GetEnv Function

Action

Returns the value of an environment variable on the host machine.

Syntax

sValue = HOST_GetEnv(sVar)
Variable Description
sValue The value of the variable. STRING.
sVar The environment variable to check. STRING.

Notes

HOST_GetEnv returns the value of the specified environment variable. The function returns an empty string ("") if the value is not defined. Unlike SYS_GetEnv, HOST_GetEnv executes in Silk Test Classic rather than in the Agent. If used in code, HOST_GetEnv is recognized by the compiler and so is seen as a constant rather than a function call. You may find it useful to access environment variables as compiler constants and in use statements.

Example

use "{HOST_GetEnv ("HOME")}\personal.inc"