PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
XVarDefined() |
This is an inbuilt function function provided by PPWIZARD.
This function is useful if you need to know if a "X variable" exists or you wish to get or update its value in rexx.
PPWIZARD stores "X variables" in rexx variables, this function always returns the name of this variable (when non-blank, "" indicates the variable does not exist). The contents can then be set or retrieved with the standard rexx "value()" function.
Note that the SetXCode() routine can also be used to set "X variables".
This call takes 2 parameters as follows:
Example |
Some simple one liners:
#RexxVar SomeVar =x= '#[SomeVarValue]#' Before = <?xSomeVar> #DefineRexx '' ;--- Get contents of variable or die --- @@Xvar = XVarDefined('SomeVar', 'Y'); Result = value(@@Xvar) ;--- Change the value --- call value @@Xvar, "new value" #DefineRexx After = <?xSomeVar>