Navigation:  Reference > Functions >

GetEnvironmentVarValue()

Print this Topic Previous pageReturn to chapter overviewNext page

 

GETENV(1)

 

PURPOSE

This function will return an environment value.  Generally these are set in the AUTOEXEC.BAT file (Win 95, 98, etc.) and are typically used instead of editing the Registry.  You can also use the SETENV() function to set an environment value that you can then read later with this function.

 

PARTS

 

1 f/c/eRequired - The name of the environment variable.

 

RETURN TYPE - A

The value set for this environment variable.  If the receiving field is too short, the remaining characters will be truncated.

 

COMMENTS

If you don't pass an environment variable name, or the name is not found, an error will be returned.

 

NOTE : After TASPRO7.0 Build 9 getenv(1) will now return a blank NULL value if environment variable is not found. Before the program would return the value 'No Value Found'

 

EXAMPLE

define s type a size 200

s = GETENV('path')

 

// this might return something like this:

// s = C:\WINDOWS;C:\WINDOWS\COMMAND;C:\UTIL;...

 

 

 

 


Page url: http://www.cassoftware.com/tas/manual/getenvironmentvarvalue().htm