PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: GetDependancyInfo()[Next]: GetFileLineBeingProcessed()
\ -> Rexx -> Inbuilt PPWIZARD Functions -> GetEnv()

GetEnv()

This is an inbuilt function function provided by PPWIZARD.

This function returns the value of an operating system environment variable. An empty string is returned if the variable is unknown.

The parameters are as follows:

  1. Variable Name
    This is the name of the environment variable.

  2. Die if Missing?
    This optional variable is used to tell ppwizard to abort if the variable could not be found. To tell PPWIZARD to abort pass upper case 'Y'.

Example

;--- Lets keep all WORK/HOME conditional logic here -------------------------
#define AtHome  translate(GetEnv("PRJSRCDIR", 'Y')) =  "E:\DB\PROJECTS\HOMEPAGE\HTML"
#define AtWork  translate(GetEnv("PRJSRCDIR", 'Y')) <> "E:\DB\PROJECTS\HOMEPAGE\HTML"

...
...

;--- External Links ---------------------------------------------------------
#if    <$AtHome>
        #define ExtLink   <A TARGET=_top HREF="{$URL}">{$VISIBLE=`{$URL}`}</A>
#elseif
        #define ExtLink   {$VISIBLE=`{$URL}`}{$URL-}
#endif


email me  any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Search][Prev]: GetDependancyInfo()[Next]: GetFileLineBeingProcessed()


PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Saturday February 17 2007 at 10:36am