PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: AllowSpell[Next]: CsReplacement
\ -> Commands -> #option -> AtChangeType

AtChangeType=["]ChangeType["]

This #option command lets you alter the way #AsIs and #AutoTag commands will perform replacements. The default method (by default) is a simple case sensitive replacement of text.

Note that this command actually changes the way the #AutoTag stores the change and will only affect the replacement of those changes defined after this option was used.

This command allows new alternative search and replace mechanisms to be slotted in without affecting any existing ones (clashing syntax etc). This method was chosen so that PPWIZARD could remain as fast as possible (it is written in rexx and so keeping performance reasonable sometimes takes compromises).

The "ChangeType" parameter can be one of the following:

  1. "" (blank)
    This returns to the "default" mode.

  2. CaseSensitive
    The ReplaceString() routine is used. This is PPWIZARD's default mode as its also the fastest.

  3. CaseInsensitive
    The ReplaceStringCI() routine is used.

  4. Fixed
    The CompareReplaceFixed() routine is used.

If you have some fantastic free PURE REXX search and replace code then I can include it as a new PPWIZARD extension if you send me the code!

Example 1

#AutoTag "AAAA"   "XXXX"           ;;Change upper case "AAAA" only (assuming default mode)

;--- Use ReplaceStringCI() ---------------
#option  PUSH AtChangeType=CaseInsensitive
#AutoTag "BBBB"   "YyYy"           ;;Change "bbbb" in any case
#AutoTag "CCCC"   "({*})"          ;;If "cccc" in any case is found then surround it by brackets

;--- Use CompareReplaceFixed() -----------
#option AtChangeType="FIXED"
#AutoTag      '@=,1=^HTML^@=,5=+x+'       'REM CS->@$1,*;'        ;;Case sensitive compare for "HTML" then "x"
#AutoTag      '!i@=,1=^HTML^!S@=,-1=+x+'  'REM CI->@$1,*;'        ;;Case insensitive comapre for "HTML" + sensitive compare for "x"
#AutoTag      '!L!i@=,1=^HTML^!S@=,5=+x+' 'REM CI+spaces->@$1,*;' ;;Same as above but ignoring whitespace (leading)
#option  POP                       ;;Restore mode (PUSH/POP useful where original mode unknown etc)


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

[Top][Contents][Search][Prev]: AllowSpell[Next]: CsReplacement


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