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

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:

  1. The name of the "X variable".

  2. An option value which can be set to D to die if the variable does not exist. A value of N indicates that you wish the name of the variable returned whether or not it exists.

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>


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

[Top][Contents][Search][Prev]: WriteLineToTmpImportFile()[Next]: Rexx Subroutines in PPWIZARD


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