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.

The parameters are as follows:

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

  2. Die if Missing?
    Passing an upper case 'Y' to this optional parameter tells PPWIZARD to abort with an error message if the environment variable doesn't exist, otherwise it will return "" in this case.

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 May 28 2022 at 2:55pm