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

RandomString()

This is an inbuilt function function provided by PPWIZARD.

This function will use the template string you provide and returned it filled in with randomly chosen characters. This can be handly for generating random variable names or similar strings.

The function takes 2 parameters:

  1. The template string. This is a string which should contain one or more '?' characters each of which will be replaced with a randomly chosen character.

  2. An optional string of characters. The random characters will be chosen out of this string. If this parameter is not passed then the default string is the digits 0-9 and the uppercase characters A-Z.

Stupid Example

#evaluate     'Var1'  ~RandomString('VAR1_????')~
#evaluate     'Var2'  ~RandomString('????????')~

...

<$Var1> = <$Var1> + 1;
<$Var2> = <$Var1>;


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

[Top][Contents][Search][Prev]: QuoteIt()[Next]: Reading()


PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Sunday November 05 2017 at 10:00am