PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: QuoteIt()[Next]: ReplaceCurlyHexCodes()

RandomString()

This is a rexx function provided by PPWIZARD. This routine (like all PPWIZARD extensions) can be used with any operating system supported 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>;
    


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

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Thursday January 17 2002 at 6:27pm