Reviewed and revised December 2023
tab(-10, AG_GETENV); var {,demangle}; chr(127); Tab(-10,x) Syntax Notes
AG_GETENV (45) will return (in the keyboard buffer) the definition of the specified environment variable as defined to the ATE client (or A-Shell/Windows).
This function has both a subroutine and a print tab implementation.
In addition to real environment variables, this command also recognizes three pseudo-environment variables only understood by the A-Shell/Windows or ATE client:
• | ATEEXE: the full filespec of the client executable, e.g. "c:\ATE\bin\ashw32.exe" |
• | ATEVER: the version string for the client executable, e.g. "7.0.1753.2" |
• | ATELICMODE: a decimal value containing flags indicating how the client was licensed (see ATELICMODE for details) |
Parameters
var
the name of an environment variable you want to check the value of
demangle
if set to "1", if the variable is in the ancient DOS 8.3 compressed format, demangle it to the full long format, if possible.
Response
The value of the specified environment variable, or "" if not defined.
Examples:
map1 envval$,s,0
? tab(-10, AG_GETENV); "TEMP"; chr(127);
input "",envval$
In some very old versions of Windows, the response might look something like this:
C:\DOCUME~1\yourname\LOCALS~1\Temp
To demangle it, add the ",1" ...
? tab(-10, AG_GETENV); "TEMP,1"; chr(127);
input "",envval$
... to get a response more like:
C:\DOCUMENTS AND SETTINGS\yourname\LOCAL SETTINGS\Temp>
See Also
• | MX_GETENV for retrieving an environment variable from the application server—as opposed to client—machine. |
• | GETENV.LIT system command |