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

SetId()

This is an inbuilt function function provided by PPWIZARD.

This function is useful if you wish to ensure that when GetId() is called a specific value for an ID is used. An example of where this might be useful is if you have external entry points into a set of generated html pages. You normally would not care what they are called as long as all the links work, however as soon as you wish externally generated html to link to specific pages you must do something to ensure that the links name does not change.

The function takes 3 parameters as follows:

  1. A handle that was previously prepared with GetIdPrepare().

  2. The value (KEY) for which you are specifying an ID This is case sensitive, to make case insensitive simply convert your value to either upper or lower case before calling this routine.

    There is one situation where you may wish to pass a empty key ('') and that is when you specified unique ID mode on GetIdPrepare(). You would do this to pass an ID that you never want returned by GetId().

  3. The ID you wish to give to the value (KEY). Note that this is not validated in any way. It is up to you to ensure its correct.

Example

#evaluate ''   ^call GetIdPrepare 'PPW'^
#evaluate ''   ^call SetId 'PPW', '#define', "HashDef"^       ;;Set preferred ID
#evaluate ''   ^say GetId('PPW', 'MAXCHARS', 'define')^
#evaluate ''   ^say GetId('PPW', 'MAXCHARS', '#define')^


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

[Top][Contents][Search][Prev]: SetEnv()[Next]: SetXCode()


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