PPWIZARD Manual
[Bottom][Contents][Search][Prev]: ProcessNext()[Next]: RandomString()

QuoteIt()

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 determine a quote character that is not contained within the string you pass. Processing will abort if it can not do so.

The function takes 2 parameters:

  1. The string that you wish to quote.

  2. An option list of all possible quote characters. If not supplied it defaults to trying double then single quotes.

This routine is handy when a macro is passed some information and needs to generate the data in a quoted format. Some languages such as HTML allow information to be quoted with either a single or a double quote.

Stupid Example

    #evaluate     ''  ~RxQuote=QuoteIt('AS"DF')~
    Should be double = <??RxQuote>
    #evaluate     ''  ~RxQuote=QuoteIt("AS'DF")~
    Should be single = <??RxQuote>
    #evaluate     ''  ~RxContainsBothQuotes = 'AS"' || "'DF"~
    #evaluate     ''  ~RxQuote=QuoteIt(RxContainsBothQuotes, '"' || "'^")~
    Should be '^'    = <??RxQuote>
    #evaluate     ''  ~RxQuote=QuoteIt(RxContainsBothQuotes)~   ;;Will die
    


[Top][Contents][Search][Prev]: ProcessNext()[Next]: RandomString()

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Tuesday January 02 2001 at 7:37am