[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: access to environment vars. in windows
Gregory Branch (email@example.com) wrote
> The programming manual for V.7 SE lists an extended
> macro function for accessing the values of system
> environment variables by name from stata code. The
> text in the manual indicates that this is available in
> both Windows and Unix.
> To make a long story short, I have a common routine
> that I need to respond to a machine-specific
> parameter, and it would be vary nice if I could get at
> a the windows environment variables.
System environment variables may be accessed with the -env-
extended macro function. Here is an example:
. local x : env PATH
The local macro -x- will now contain whatever Windows has in the
PATH environment variable, and subsequent references in Stata
code to `x' wil be replaced with the contents of PATH.
* For searches and help try: