home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d09xx / d0957.lha / PARex / PARex.doc < prev    next >
Text File  |  1993-11-24  |  80KB  |  1,985 lines

  1.                   __
  2.                  / ////
  3.           __    ///
  4.           \ \  ///          < < <<<  PARex v3.00  >>> > >
  5.            \ \///
  6.             \__////        USER MANUAL - Release : 22-Nov-93
  7.  
  8.                  Copyright ⌐1991-1993 Chris P. Vandierendonck, [AmiSYS].
  9.  
  10.        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11.  
  12.        Copyright Notice
  13.        ~~~~~~~~~~~~~~~~
  14.          PARex is released  as  SHAREWARE, not excluding the copyright and
  15.          all  other  rights,  which  remain  with  the  author  Chris   P.
  16.          Vandierendonck. If you use  PARex then you must pay the shareware
  17.          fee and register. 
  18.  
  19.          Prior  written  permission  from  the  author  is   required   to
  20.          distribute  PARex  and  to  use  PARex in commercial releases, on
  21.          shareware disks, coverdisks or diskmagazines.  When  distributed,
  22.          all files must be kept together,  in  their  original  unmodified
  23.          form.
  24.  
  25.          (AmigaDOS and Workbench are trademarks of Commodore Amiga Inc.)
  26.  
  27.        Disclaimer
  28.        ~~~~~~~~~~
  29.          PARex  is provided "AS IS", WITHOUT ANY WARRANTY to its  quality,
  30.          performance or fitness for a  particular  purpose.  In  no  event
  31.          shall the author be liable or responsible  to  the  user  or  any
  32.          other person, for any kind of damage caused by the  use  of  this
  33.          software.
  34.  
  35.          Shareware registration,  suggestions,  remarks  and  bug  reports
  36.          about this program can be send to the following address :
  37.  
  38.               Chris Vandierendonck
  39.               Koning Albertstraat 188
  40.             B-8210   VELDEGEM
  41.               BELGIUM
  42.  
  43.        SHAREWARE information
  44.        ~~~~~~~~~~~~~~~~~~~~~
  45.          This DEMO  version  of  PARex only processes the first 4096 bytes
  46.          of the source file!! To receive the unlimited  version  you  must
  47.          pay  the  shareware  fee of 15 US dollars (DEM 20 or GBP 10). The
  48.          ModulaII source code is also available,  see  the  "RegForm"  for
  49.          more info.
  50.  
  51.          If possible, use a printout  of  the  'RegForm' file to register.
  52.          Send this  form  along  with  the  shareware  fee  to  the  above
  53.          address. You can send the money in  cash  (fastest  and  cheapest
  54.          way),  or  by  (international)  money  order  payable  to   Chris
  55.          Vandierendonck. (DO NOT send  bankcheques,  since  they  are  too
  56.          expensive to clear!)
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                           PARex v3.0x User Manual - Page 1
  64.  
  65.        Preface
  66.        ~~~~~~~
  67.          PARex is a program to replace certain  strings  in  a  file.  The
  68.          result can be saved to any file, or  back  to  the  source  file.
  69.          PARex takes its replace data from the  command  line  or  from  a
  70.          script file (here an unlimited number of replace strings  can  be
  71.          defined). Generally  PARex will be used on text files, but binary
  72.          files can also be processed.
  73.  
  74.          The  power  of  PARex is found in its data script. Here  you  can
  75.          define as many replace strings as  you  want.  By  which  strings
  76.          they should be replaced, can  depend  on  commands  used  on  the
  77.          command line. You can  divide  the  script  into  several  parts,
  78.          which can then be selected at startup.
  79.  
  80.          PARex can be  used  to  replace  strings  in  (text)files,  strip
  81.          comments  from  source  code,  convert  files  between  different
  82.          computer systems, discard all  print  control  sequences  from  a
  83.          text file, convert an  AmigaGuide  file  to  a  normal  textfile,
  84.          etc... 
  85.  
  86.          PARex is reentrant, so it can be made resident. During  execution
  87.          you can terminate PARex by pressing 'CTRL-C'.
  88.  
  89.        System Requirements
  90.        ~~~~~~~~~~~~~~~~~~~
  91.          PARex requires AmigaDOS v1.2 or higher to "perform".  
  92.  
  93.        Program Usage  (Shell/CLI only)
  94.        ~~~~~~~~~~~~~
  95.         ("?" gets the program format, and "⌐" the program's copyright  and
  96.          version.)
  97.  
  98.        [[FROM] <file|dir|pat>] [[TO] <file|dir>] [CONVERT]  [PRT|PAR|SER]
  99.        [NOSCRIPT] [SCRIPT <file[.pxs]>] [GLOBAL] [MODE <name|pat]>] [ALL]
  100.        [READ <#bytes>] [TOUCH <#bytes>] [BUFFER <#bytes>]  [LOAD]  [STAT]
  101.        [HEXDUMP [<fmtstr>]] [CASECHECK] [UCASE] [LCASE]  [TRACE] [SILENT]
  102.        [NOVERSION]
  103.  
  104.        [WHEN <name|pat>] [CAP|DECAP] [WILD] [CONTEXT] [NEST] [FIT] [ZERO]
  105.        [MINSIZE <#bytes>] [MAXSIZE <#bytes>] [LEFTFILL|RIGHTFILL <0.255>]
  106.        [TIMES <#>] [EVERY <#>] [AFTER <#>] [WORD]
  107.  
  108.        [[{] INIT  <str> [<cmds> }]]          [[{] CLOSE <str> [<cmds> }]]
  109.        [[{] REPL  <str> BY <str> [<cmds> }]] [[{] CAP   <str> [<cmds> }]]
  110.        [[{] STRIP <str> TO <str> [<cmds> }]] [[{] DECAP <str> [<cmds> }]]
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                           PARex v3.0x User Manual - Page 2
  128.  
  129.        TABLE OF CONTENTS
  130.        ~~~~~~~~~~~~~~~~~
  131.        1. Source and destination file ................................  3
  132.           1.1. Source file/directory .................................  3
  133.           1.2. Destination file/directory ............................  3
  134.           1.3. Advanced options ......................................  5
  135.                1.3.1. Reading part of the source file ................  5
  136.                1.3.2. Writing directly into the source file ..........  5
  137.                1.3.3. Buffer sizing ..................................  6
  138.  
  139.        2. Global converting options ..................................  7
  140.           2.1. Hexadecimal output ....................................  7
  141.           2.2. Case conversion .......................................  8
  142.  
  143.        3. Program information ........................................  9
  144.           3.1. Before processing .....................................  9
  145.           3.2. During processing .....................................  9
  146.           3.3. After processing ......................................  9
  147.           3.4. Suppressing information ............................... 10
  148.  
  149.        4. Main replace commands ...................................... 11
  150.           4.1. INIT  : inserting a string at the beginning of a file . 11
  151.           4.2. CLOSE : adding a string to the end of a file .......... 12
  152.           4.3. REPL  : replacing one string by another ............... 12
  153.           4.4. STRIP : removing characters between two strings ....... 13
  154.           4.5. CAP   : putting found string in upper case ............ 14
  155.           4.6. DECAP : putting found string in lower case ............ 14
  156.           4.7. Formatting of the searchStr and replStr ............... 14
  157.  
  158.        5. Search control ............................................. 17
  159.           5.1. Case-sensitive searching .............................. 17
  160.           5.2. Wildcard searching .................................... 17
  161.           5.3. Context remembering ................................... 18
  162.           5.4. Word-only searching ................................... 19
  163.  
  164.        6. Program variables .......................................... 20
  165.           6.1. PARex information ..................................... 20
  166.           6.2. Inserting files ....................................... 20
  167.           6.3. Inserting date and time ............................... 21
  168.           6.4. Inserting path and name of source & destination file .. 22
  169.  
  170.        7. Using PARex data scripts ................................... 23
  171.           7.1. Setting up scripts .................................... 23
  172.           7.2. Script commands ....................................... 23
  173.           7.3. Script options ........................................ 24
  174.  
  175.        8. Additional sub-commands .................................... 26
  176.           8.1. Limit replacing ....................................... 26
  177.           8.2. Defining the size of the replace string ............... 26
  178.           8.3. Case conversion ....................................... 28
  179.           8.4. Making sub-commands to work on all main-commands ...... 28
  180.         
  181.        9. Option reference ........................................... 29
  182.  
  183.        10. Command reference ......................................... 30
  184.            10.1. Main commands ....................................... 30
  185.            10.2. Sub-Commands ........................................ 30
  186.            10.3. Script Commands ..................................... 30
  187.  
  188.        11. Variables ................................................. 31
  189.  
  190.  
  191.                                           PARex v3.0x User Manual - Page 3
  192.  
  193.        1. Source and destination file.
  194.  
  195.        1.1. Source file/directory.
  196.  
  197.          Option[FROM] <file|dir|pattern>
  198.  
  199.           ╗ This  is  the  file  to  be converted. You can also specify  a
  200.             directory, which implicates that all files of  that  directory
  201.             will   be   processed.   If   you   don't   give   a    source
  202.             file/directory,  then  PARex will process  all  files  in  the
  203.             current directory!
  204.  
  205.           ╗ A pattern can be given in order to only process  certain  file
  206.             of  a  given  directory  or  of  the  current  directory.  The
  207.             following  wildcards  are  supported  : "#", "?", "*" (same as
  208.             "#?"),  "'"  and  "|"  (refer  to   your Amiga  systemsoftware
  209.             manual for more information on these wildcards).
  210.  
  211.               | 'PARex RAM:T/*.doc|*.txt' -> only  process  files  in  the
  212.               | "RAM:T" directory with the ".doc" or ".txt" suffix.  
  213.  
  214.           ╗ The FROM keyword is optional. 
  215.  
  216.        !! ╗ If no source file  is  given,  then  PARex  will  process  all
  217.             files of the current directory!
  218.  
  219.          NOTE: the source files can  be  plain  text  files,  as  well  as
  220.                binary files, such as programs. 
  221.  
  222.  
  223.        1.2. Destination file/directory.
  224.  
  225.          WARNING: only one of the following  destination  options  can  be
  226.                   used.
  227.  
  228.          Option[TO] <file|dir>  
  229.  
  230.           ╗ This is the destination (target)  file.  It's  the  result  of
  231.             the  converting  process.  As  with  the  source   file,   you
  232.             can also specify a directory in which to  save  the  converted
  233.             files.
  234.  
  235.           ╗ If  no  target  file/directory  is  given  (and  [CONVERT]  or
  236.             [TOUCH] isn't used), then the target  file(s)  will  have  the
  237.             same  name  as  the  source  file(s)  except  for  the  ".prx"
  238.             suffix.
  239.  
  240.        !! ╗ The TO keyword is optional, provided a source  name  has  been
  241.             given before this option.
  242.  
  243.           NOTE: the   file   attributes   (protection   flags)   of    the
  244.                 sourcefile(s)  are   preserved.   In   other   words   the
  245.                 destination file(s)  have  the  same  file  attributes  as
  246.                 their source file.
  247.  
  248.           TIP: use "*" to output processed file to the Shell window.
  249.  
  250.                  | ' PARex RAM:source * ' 
  251.                  | Will dump the RAM:source file to the Shell window. 
  252.  
  253.  
  254.  
  255.                                           PARex v3.0x User Manual - Page 4
  256.  
  257.          OptionCONVERT  
  258.  
  259.           ╗ With this option the source itself will be  converted.  To  do
  260.             this  PARex works as follows, first the results are  saved  to
  261.             a new file. When the processing is finished, the  source  file
  262.             is deleted and the  newly  created  file is renamed as the old
  263.             source file. 
  264.  
  265.           ╗ Since  PARex works in this way, you can safely  terminate  the
  266.             converting process with  CTRL-C.  Your  original  source  file
  267.             will still be intact!
  268.  
  269.          OptionPRT|PAR|SER 
  270.  
  271.           ╗ One  of  these  option  keywords  sends  the  output  to   the
  272.             printer: - PRT uses "PRT:" to output;
  273.                      - PAR uses "PAR:" to output;
  274.                      - SER uses "SER:" to output.
  275.  
  276.           ╗ You must use one of the last two if  your  text  contains  raw
  277.             printer commands, which only your printer understands.
  278.  
  279.        1.3. Advanced options.
  280.  
  281.        The options discussed in the following  points,  are  intended  for
  282.        more advanced users, who know what they're doing.
  283.  
  284.        1.3.1. Reading part of the source file.
  285.  
  286.          OptionREAD <# bytes>
  287.  
  288.           ╗ The  READ  option  forces  PARex to  only  process  the  given
  289.             number of bytes of the source file.
  290.            
  291.                | ' PARex RAM:source READ 500 REPL a BY b '
  292.                | In this case PARex  will  only  read  500  bytes  of  the
  293.                | source file 'RAM:source', convert all  a's  to  b's,  and
  294.                | write the result to 'RAM:source.prx'.
  295.  
  296.           WARNING: don't ever use an  option  which  writes  back  to  the
  297.                    source file, unless you know  what  you're  doing.  The
  298.                    rest of your source file will definitely be lost!
  299.  
  300.        1.3.2. Writing directly into to the source file.
  301.  
  302.          OptionTOUCH <# bytes>
  303.  
  304.           ╗ This option is intended to convert only  a  small  section  at
  305.             the beginning of a large file, without having to  process  the
  306.             whole  file.  PARex will  read  the  given  number  of  bytes,
  307.             process them, and write back the same amount of bytes!
  308.  
  309.                | ' PARex RAM:source TOUCH 500 REPL a BY b '
  310.                | In this case PARex will read 500 bytes  from  the  source
  311.                | file, convert all  a's  to  b's  and  write  exactly  500
  312.                | bytes back to the  source  file! This means, that all a's
  313.                | in the first 500 bytes of  the  file  will  be  b's  now,
  314.                | while the rest still remain a's. 
  315.  
  316.  
  317.  
  318.  
  319.                                           PARex v3.0x User Manual - Page 5
  320.  
  321.           ╗ An example of the use of the TOUCH  option  can  be  found  in
  322.             the  program  script  "AutoVERS". This script was  written  to
  323.             install  a  header  at  the  beginning  of   a   source   file
  324.             (ModulaII, Oberon, C, Assembler, ARexx  or  AmigaDOS).  Before
  325.             each compilation  of  the  source  file,  AutoVERS can then be
  326.             called again to update the header. 
  327.  
  328.           NOTE: PARex will always write the same amount of bytes  back  to
  329.                 the source file, as it has read in the first place!
  330.  
  331.           WARNING: only use this option if you really know what  PARex  is
  332.                    going to do!
  333.  
  334.        1.3.3. Buffer sizing.
  335.  
  336.          OptionBUFFER <# bytes>
  337.  
  338.           ╗ By default, PARex uses 4096 bytes for each  buffer  it  needs.
  339.             With this option one can enlarge the size  of  these  buffers,
  340.             as far as memory allows you to.  If  you're  a  harddisk  user
  341.             then this option really doesn't speed up processing. 
  342.  
  343.           ╗ If PARex can't allocate the desired size, then  it  will  fall
  344.             back to the default size of 4096 bytes.
  345.  
  346.           ╗ The following buffers are affected :
  347.              - the read buffer (stores source file; always present)
  348.              - the write buffer (only used if replace commands are used)
  349.              - the hexdump write buffer (only used if HEXDUMP is used)
  350.              - the insert file buffer (only used if &FILE:& is used)
  351.              - the context buffer (only used if CONTEXT is used)
  352.  
  353.          Option[LOAD]
  354.  
  355.           ╗ This option forces PARex to load the entire source  file  into
  356.             memory, and thus to speed up the processing in case  of  large
  357.             files. If memory doesn't allow  this,  then  PARex  will  fall
  358.             back on the default buffer size. 
  359.  
  360.           NOTE: Using this option is recommended for  floppy  disk  users,
  361.                 and certainly when wildcard searching is needed.
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.                                           PARex v3.0x User Manual - Page 6
  384.  
  385.        2. Global converting options.
  386.  
  387.        2.1. Hexadecimal output.
  388.  
  389.          OptionHEXDUMP [<fmtstr>]
  390.  
  391.           ╗ Using   this   option   will   result   in    a    hexadecimal
  392.             representation of the processed file. You  can  do  everything
  393.             as if  HEXDUMP  wasn't  used,  since  PARex will only save the
  394.             processed bytes in a hexadecimal text  just  before  it  saves
  395.             them to the destination file. 
  396.  
  397.           ╗ If no format string is given, then the  (default)  hexadecimal
  398.             output will look something like this:
  399.  
  400.            00000000: E3100001 00000000 001B000F 004D0012 πññññññññññññMññ
  401.            00000010: 00060003 000107C6 DF0007C6 E1080000 ñññññññ╞▀ññ╞ßñññ
  402.            00000020: 00000000 00000000 00000000 00000001 ññññññññññññññññ
  403.            00000030: 01180000 00000000 00000000 00170000 ññññññññññññññññ
  404.            00000040: 000707C6 98A00000 00000000 00000000 ñññ╞ñáññññññññññ
  405.            00000050: 0015016A 003FFFFF 00000000 0200127F ñññjñ?  ñññññññ
  406.            00000060: 0029AEF2 00000000 0026115C 00000000 ñ)«≥ñññññ&ñ\ññññ
  407.            ...
  408.  
  409.           ╗ One can change  the  format  of  this  output  by  defining  a
  410.             formatstring, using the following codes:  
  411.  
  412.               %Px : byte position, where x is the width [1..8]
  413.  
  414.               %Bx : byte value where 'x' is number of bytes on one line
  415.               %Wx : word value where 'x' is number of words on one line
  416.               %Lx : long value where 'x' is number  of  longwords  on  one
  417.                     line
  418.  
  419.               %Ax : ASCII text, where 'x' is the value of the character
  420.                     used to represent non-printable characters
  421.  
  422.               NOTE: the  value  'x'  can  be  given  in  decimal  (can  be
  423.                     introduced by "\d"), in hexadecimal  (introduced  with
  424.                     "\x") or in octal (introduced with "\o") notation! 
  425.  
  426.               NOTE: the formatting codes are interpreted case-sensitive!
  427.                
  428.           ╗ The used default format looks like : "%P8: %L4 %A\d164"
  429.  
  430.           ╗ A  format  string  like  "%W5 \"%A\d186\" :%P4" would give the
  431.             following output: 
  432.  
  433.                E310 0001 0000 0000 001B "π║║║║║║║║║" :0000
  434.                000F 004D 0012 0006 0003 "║║║M║║║║║║" :000A
  435.                0001 07C6 DF00 07C6 E108 "║║║╞▀║║╞ß║" :0014
  436.                0000 0000 0000 0000 0000 "║║║║║║║║║║" :001E
  437.                0000 0000 0000 0001 0118 "║║║║║║║║║║" :0028
  438.                0000 0000 0000 0000 0000 "║║║║║║║║║║" :0032
  439.                0017 0000 0007 07C6 98A0 "║║║║║║║╞║á" :003C
  440.                0000 0000 0000 0000 0000 "║║║║║║║║║║" :0046
  441.                0015 016A 003F FFFF 0000 "║║║j║?  ║║" :0050
  442.                ...
  443.  
  444.  
  445.  
  446.  
  447.                                           PARex v3.0x User Manual - Page 7
  448.  
  449.        2.2. Case conversion.
  450.  
  451.        The following two options affect all bytes saved to a file. 
  452.  
  453.          OptionUCASE
  454.  
  455.           ╗ This option will convert all bytes to upper case characters.
  456.  
  457.          OptionLCASE
  458.  
  459.           ╗ This option will convert all bytes to lower case characters.
  460.  
  461.          WARNING: don't use these options on binary files, since not  only
  462.                   text will be affected, but also the programming code!
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.                                           PARex v3.0x User Manual - Page 8
  512.  
  513.        3. Program information.
  514.  
  515.        3.1. Before processing.
  516.  
  517.        Before  PARex starts processing a file,  it  prints  the  following
  518.        information :
  519.  
  520.           - name of the used PARex script (<none> if none used);
  521.           - name of the used script mode(s) (<none> if none used);
  522.           - 'GLOBAL' if the GLOBAL mode was also used;
  523.           - number of replace commands used (0..x);
  524.           - 'I' if a INIT command is used;
  525.           - 'C' if a CLOSE command is used.
  526.  
  527.        Maybe this information seems a bit strange to you  now,  but  later
  528.        everything will become clear.
  529.  
  530.        3.2. During processing.
  531.  
  532.          OptionTRACE
  533.  
  534.           ╗ By  default   PARex  doesn't  output  any  information  during
  535.             processing of the source file. Using this  option  will  force
  536.             PARex to output how many percent of the  source  file  already
  537.             has been processed.
  538.  
  539.           TIP: using TRACE will  keep  your  mind  at  rest,  seeing  that
  540.                PARex is doing some heavy duty for you!
  541.  
  542.           NOTE: most   of   the   program   scripts   supplied   in    the
  543.                 "ParexScripts" directory use the TRACE option.
  544.  
  545.        3.3. After processing.
  546.  
  547.          After  PARex has finished with processing the  source  file,  the
  548.          following information is given: 
  549.  
  550.            - number of bytes used by the destination file;
  551.            - number of replacements done on the file.
  552.  
  553.          OptionSTAT
  554.  
  555.           ╗ Users  who  want  more  detailed  information  can  use   this
  556.             option. The following information is then given:
  557.  
  558.             * General info: 
  559.                - number of ticks and seconds PARex needed;
  560.                - size of the source and  the  destination  file,  as  well
  561.                  as the difference between the two sizes.
  562.  
  563.             * Command info:
  564.                - number of REPL  commands  used,  and  percentage  of  the
  565.                  total number of replacements; 
  566.                - number of STRIP commands used, and percentage of total;
  567.                - number of CAP commands used, and percentage of total;
  568.                - number of DECAP commands used, and percentage of total.
  569.  
  570.             * Variable info:
  571.                - number of &FILE& variables used;
  572.                - number of &TIME& variables used;
  573.  
  574.  
  575.                                           PARex v3.0x User Manual - Page 9
  576.  
  577.                - number of &SRCPATH& variables used;
  578.                - number of &SRCNAME& variables used;
  579.                - number of &DSTPATH& variables used;
  580.                - number of &DSTNAME& variables used.
  581.  
  582.        3.4. Suppressing information.
  583.  
  584.          OptionNOVERSION
  585.  
  586.           ╗ Suppresses the output of the programs  copyright  and  version
  587.             prompt.
  588.  
  589.          OptionSILENT
  590.  
  591.           ╗ All program  messages  are  suppressed  when  this  option  is
  592.             selected. In other words, TRACE or STAT won't work.
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.                                          PARex v3.0x User Manual - Page 10
  640.  
  641.        4. Main replace commands.
  642.  
  643.        Currently  PARex supports several replace commands. But  before  we
  644.        start with explaining them some words on used terms:
  645.  
  646.          - main command: refers to the following replace  commands:  INIT,
  647.                          CLOSE, REPL, STRIP, CAP, DECAP.
  648.                          As many of these commands  can  be  used  on  the
  649.                          command line as AmigaDOS allows. If you  need  to
  650.                          use many commands than it's better  to  create  a
  651.                          PARex script, which may contain as  many  as  you
  652.                          need. When no replace  commands  are  used,  then
  653.                          PARex will just copy the source file!
  654.  
  655.                          NOTE: the order  in  which  you  enter  different
  656.                                replace commands is important, since  PARex
  657.                                will always start searching with the  first
  658.                                one,  then  the  second,  and  so  on.  The
  659.                                replace commands  entered  on  the  command
  660.                                line, are used before the ones in the  data
  661.                                scripts! In other  words,  first  found  is
  662.                                first served! This hierarchy doesn't  apply
  663.                                to INIT and CLOSE.
  664.  
  665.          - sub command : a command that can only be used in relation  with
  666.                          a  main  command.  A  sub-command  redirects  the
  667.                          working of the main command. These  commands  are
  668.                          explained throughout this manual.
  669.  
  670.                          NOTE: as  a  general  rule,  always  enclose  the
  671.                                main-command and its  sub-commands  between
  672.                                curly brackets ("{"   &  "}")  if  you  use
  673.                                them on the command line. 
  674.  
  675.          - searchStr   : the string (text or other) PARex has to find.
  676.  
  677.          - replStr     : the string  which  comes  in  the  place  of  the
  678.                          searchStr. The  replStr  can  also  be  an  empty
  679.                          string, which is then defined as ' "" '!
  680.  
  681.        When describing the main commands, examples  will  be  given  where
  682.        the searchStr and/or the replStr will contain strange codes.  These
  683.        codes are later explained in point 4.7.
  684.  
  685.        4.1. INIT : inserting a string at the beginning of a file.
  686.  
  687.          CommandINIT <str>
  688.  
  689.           ╗ This command will put the <str> at the very beginning  of  the
  690.             destination file. Only  when  this  string  has  been  written
  691.             will  PARex commence with the actual processing of the  source
  692.             file.
  693.  
  694.               | ' PARex ram:source INIT "I will be the first line!" '
  695.               | The ram:source.prx (destination) file  will  be  the  same
  696.               | as the source file, except that the given string  will  be
  697.               | the first line.
  698.  
  699.           NOTE: this command is only used once!
  700.  
  701.  
  702.  
  703.                                          PARex v3.0x User Manual - Page 11
  704.  
  705.           WARNING: when this command is used on  the  command  line,  then
  706.                    any such commands in a used data script are ignored.
  707.  
  708.          Sub-cmds: [CAP|DECAP] [MINSIZE <# bytes>] [MAXSIZE <# bytes>]
  709.                    [LEFTFILL|RIGHTFILL <0..255>]
  710.  
  711.        4.2. CLOSE : adding a string to the end of a file.
  712.  
  713.          CommandCLOSE <str>
  714.  
  715.           ╗ This  command  will  append  the  <str>  at  the  end  of  the
  716.             destination  file.  Thus  only  after  PARex has finished with
  717.             the source file, will this string be written.
  718.  
  719.               | ' PARex ram:source PRT CLOSE \f '
  720.               | After the source file has been  send  to  the  printed,  a
  721.               | page-eject code will be send.
  722.  
  723.           NOTE: this command is only used once!
  724.  
  725.           WARNING: when this command is used on  the  command  line,  then
  726.                    any such commands in a used data script are ignored.
  727.  
  728.          Sub-cmds: [CAP|DECAP] [MINSIZE <# bytes>] [MAXSIZE <# bytes>]
  729.                    [LEFTFILL|RIGHTFILL <0..255>]
  730.  
  731.        4.3. REPL : replacing one string by another.
  732.  
  733.          CommandREPL <str> BY <str>
  734.  
  735.           ╗ This command searches for  the  first  <str>,  and  if  found,
  736.             replaces it with the second <str>.
  737.  
  738.               | ' PARex ram:source REPL hello BY hi '
  739.               | All "hello" strings will be  replaced  by  hi.  Note  that
  740.               | "hello" is search non-case sensitive  here.  If  you  only
  741.               | want to replace  "hello"  and  not  "HeLLo"  for  example,
  742.               | then use the CASECHECK option.
  743.  
  744.          Sub-cmds: [OR <str> WHEN <name>] [WILD] [WORD] [CONTEXT] 
  745.                    [TIMES <#>] [EVERY <#>] [AFTER <#>] [CASE] [NOCASE]
  746.                    [FIXCASE] [CAP|DECAP] [FIT] [ZERO] 
  747.                    [MINSIZE <# bytes>] [MAXSIZE <# bytes>]
  748.                    [LEFTFILL|RIGHTFILL <0..255>]
  749.  
  750.          Sub-cmdOR <str> WHEN <name>
  751.  
  752.           ╗ This sub-command is only of use when the REPL  is  used  in  a
  753.             script (see chapter 7 on the use of scripts).  It  enables  us
  754.             to  define  two  replStr's.  The  second replStr, which is the
  755.             <str> after the OR keyword, will  only  be  used  (instead  of
  756.             the first <str>), if  the  name  given  with the WHEN (command
  757.             line) option, matches the WHEN name of this sub-command.
  758.  
  759.             Look at the program format again, which  was  printed  at  the
  760.             beginning of this  manual.  There  you'll  see  the  following
  761.             option: [WHEN  <name|pattern>]. It's with this option that  we
  762.             can decide if we're going to use the  second  replStr.  We  do
  763.             this by entering a name, or  a  pattern.  This  name  is  then
  764.             compared with the name  given  in  the  WHEN  sub-command.  If
  765.  
  766.  
  767.                                          PARex v3.0x User Manual - Page 12
  768.  
  769.             they match then the  second  replStr  is  used,  if  not,  the
  770.             first is used.
  771.  
  772.               | ' REPL hello BY hi OR bye WHEN quit '
  773.               | If we just use ' PARex ram:source ' then "hello" will be
  774.               | replace by "hi".
  775.               |  But  if  we   use   ' PARex ram:source WHEN quit ',  then
  776.               | "hello" will be replaced by "bye" and not by "hi"! 
  777.  
  778.           NOTE: only the WHEN option name may be a pattern, not  the  name
  779.                 in the sub-command!
  780.  
  781.        4.4. STRIP : removing characters between two strings.
  782.  
  783.          CommandSTRIP [+|-]<str> TO [+|-]<str>
  784.  
  785.           ╗ This command is used to discard  all  characters  between  the
  786.             two given  strings,  including  the  strings  themselves.  The
  787.             most  common  use  for  this   command   is the  stripping  of
  788.             comments in source files. Note that both string  arguments  of
  789.             the STRIP command are searchstrings.
  790.  
  791.               | ' PARex ram:source { STRIP /* TO */ } '
  792.               | This  will  remove  all  C-comments  from  the  ram:source
  793.               | file. Note that this doesn't catch  nested  comments,  and
  794.               | can therefore result in stripping  non-comment  text!  But
  795.               | a sub-command is provided to solve this problem! 
  796.  
  797.           ╗ If you don't want to strip the searchstrings  themselves  then
  798.             you must type a minus sign (-) before the searchstring.
  799.  
  800.               | ' STRIP -/* TO */ ' will strip the text between  "/*"  and
  801.               | "*/", including the last "*/"  string.  The  first  string
  802.               | "/*" isn't stripped!
  803.  
  804.             If a searchStr should begin with a minus sign, then  you  must
  805.             type  a  minus  sign  (-)  first  if  you  want  to  keep  the
  806.             searchStr after stripping, or a plus sign  (+)  if  you  don't
  807.             want to keep it.
  808.  
  809.               | ' STRIP +-[ TO --] '  The  first  string  "-["   will   be
  810.               | stripped, but the second string "-]" will be kept. 
  811.  
  812.          Sub-cmds: [NEST] [WILD] [WORD] [TIMES <#>] [EVERY <#>] 
  813.                    [AFTER <#>] [CASE] [NOCASE] [FIXCASE] [CAP|DECAP] 
  814.  
  815.          Sub-cmdNEST
  816.  
  817.           ╗ As mentioned earlier, the bare STRIP command  doesn't  account
  818.             for  nested  comments.  Some  languages  don't  allow   nested
  819.             comments, such as assemblers or even AmigaDOS. Here  all  text
  820.             after the semi-colon (";") upto the end-of-line  character  is
  821.             regarded as a comment. But most  programming  languages  allow
  822.             nested  comments.  The  NEST  sub-command  is  used  to  strip
  823.             nested  comments  from  source  files,  without  harming   the
  824.             actual source.
  825.  
  826.               | ' PARex ram:source { STRIP /* TO */ NEST } '
  827.               | Does the same as the previous  example,  but  now  without
  828.               | the risque of losing valuable source code. 
  829.  
  830.  
  831.                                          PARex v3.0x User Manual - Page 13
  832.  
  833.           RULE: if a programming language  allows  nested  comments,  then
  834.                 always  use  the  NEST  sub-command! This is the case with
  835.                 ModulaII, Oberon, C and even ARexx scripts.
  836.  
  837.        4.5. CAP : putting found string in upper case.
  838.  
  839.          CommandCAP <str>
  840.  
  841.           ╗ This command will  put  the  found  searchStr  in  upper  case
  842.             characters.
  843.  
  844.               | ' PARex ram:source LOAD { CAP p#?x WILD } '
  845.               | This will put all text which matches  the  "p#?x"  pattern
  846.               | in upper case.
  847.  
  848.          Sub-cmds: [WILD] [WORD] [TIMES <#>] [EVERY <#>] [AFTER <#>] 
  849.                    [CASE] [NOCASE] [FIXCASE]
  850.  
  851.        4.6. DECAP : putting found string in lower case.
  852.  
  853.          CommandDECAP <str>
  854.  
  855.           ╗ This command will  put  the  found  searchStr  in  upper  case
  856.             characters.
  857.  
  858.               | ' PARex ram:source LOAD { CAP p#?x WILD } '
  859.               | This will put all text which matches  the  "p#?x"  pattern
  860.               | in upper case.
  861.  
  862.          Sub-cmds: [WILD] [WORD] [TIMES <#>] [EVERY <#>] [AFTER <#>] 
  863.                    [CASE] [NOCASE] [FIXCASE]
  864.  
  865.        4.7. Formatting of the searchStr and replStr.
  866.  
  867.        ╗ Always enclose the string between double quotation  marks  if  it
  868.          contains spaces, or if it begins with a semi-colon!
  869.  
  870.            | "Hello there"
  871.            | If no quotation marks would be used, then  PARex will see two
  872.            | strings, instead of one.
  873.  
  874.        ╗ In  some  cases  the  datastring  will  have  to  contain  double
  875.          quotation marks. In order to introduce such  a  double  quotation
  876.          mark in your datastring you must enter a  backslash  followed  by
  877.          the quotation mark (\").
  878.  
  879.            | REPL \e[2\"z BY NLQ_on 
  880.            | This  command  will  search  for  the  nlq  printer   control
  881.            | sequence ( ESC[2"z ) and replace it with "NLQ_on" if found.
  882.  
  883.        ╗ Besides the double  quotation  mark  PARex supports other special
  884.          characters (they're all introduced by a backslash '\') :
  885.  
  886.             \0 : null
  887.             \e : ESCape
  888.             \n : new line
  889.             \t : horizontal tab
  890.             \v : vertical tab
  891.             \f : form feed
  892.             \r : return
  893.  
  894.  
  895.                                          PARex v3.0x User Manual - Page 14
  896.  
  897.             \b : backspace
  898.             \" : double quotation mark
  899.             \\ : backslash 
  900.             \& : ampersand 
  901.  
  902.        ╗ All   the   CTRL-codes  in  the  ASCII  range  0..31   are   also
  903.          supported. Below is a table of the codes and their name :
  904.  
  905.             CODE CHARACTER  DEC DESCRIPTION
  906.             ---- ---------- --- -----------
  907.             \c@  CTRL-@       0 NUL (null)  
  908.             \cA  CTRL-A       1 SOH (start of heading)  
  909.             \cB  CTRL-B       2 STX (start of text)  
  910.             \cC  CTRL-C       3 ETX (end of text; break)  
  911.             \cD  CTRL-D       4 EOT (end of transmission)   
  912.             \cE  CTRL-E       5 ENQ (enquiry)  
  913.             \cF  CTRL-F       6 ACK (acknowledge)  
  914.             \cG  CTRL-G       7 BEL (beep)  
  915.             \cH  CTRL-H       8 BS  (backspace)  
  916.             \cI  CTRL-I       9 HT  (horizontal tabulation)  
  917.             \cJ  CTRL-J      10 LF  (line feed)  
  918.             \cK  CTRL-K      11 VT  (vertical tabulation)  
  919.             \cL  CTRL-L      12 FF  (form feed)   
  920.             \cM  CTRL-M      13 CR  (carriage return)  
  921.             \cN  CTRL-N      14 SO  (shift out)  
  922.             \cO  CTRL-O      15 SI  (shift in)  
  923.             \cP  CTRL-P      16 DLE (data link escape)  
  924.             \cQ  CTRL-Q      17 DC1 (device control 1 or X-ON)  
  925.             \cR  CTRL-R      18 DC2 (device control 2)  
  926.             \cS  CTRL-S      19 DC3 (device control 3 or X-OFF)  
  927.             \cT  CTRL-T      20 DC4 (device control 4)  
  928.             \cU  CTRL-U      21 NAK (negative acknowledge)  
  929.             \cV  CTRL-V      22 SYN (synchronous idle)  
  930.             \cW  CTRL-W      23 ETB (end of transmission block)  
  931.             \cX  CTRL-X      24 CAN (cancel)  
  932.             \cY  CTRL-Y      25 EM  (end of medium)  
  933.             \cZ  CTRL-Z      26 SUB (substitute)  
  934.             \c[  CTRL-[      27 ESC (escape)  
  935.             \c\  CTRL-\      28 FS  (file separator)  
  936.             \c]  CTRL-]      29 GS  (group separator)  
  937.             \c^  CTRL-^      30 RS  (record separator)  
  938.             \c_  CTRL-_      31 US  (unit separator)  
  939.  
  940.        ╗ All  ASCII-codes [0..255] can also be  inserted  by  using  their
  941.          ASCII  value.  This  value  can   be   in   decimal,   octal   or
  942.          hexadecimal.  To  introduce  an  ASCII  value  you  must  us  the
  943.          following :
  944.  
  945.             \d# : decimal value, where # is a number in the 0..255  range.
  946.                   The value can have no more than 3 characters.
  947.             \o# : octal value, where # is a number in  the  0..377  range.
  948.                   The value can no more than 3 characters. 
  949.             \x# : hexadecimal value, where # is  a  number  in  the  0..FF
  950.                   range. The value can have no more than 2 characters.
  951.  
  952.           NOTE: preceding  zeros  aren't   needed,   unless   PARex  could
  953.                 interprete a character  of  the  string  as  part  of  the
  954.                 number. If this is the case then your value must have  the
  955.                 maximum character width.
  956.  
  957.  
  958.  
  959.                                          PARex v3.0x User Manual - Page 15
  960.  
  961.                   | '\d94 wheels'   -> interpreted as '^ wheels' ('^'  has
  962.                   |                    ASCII-value 94)
  963.                   | '\d0094 wheels' -> interpreted as TAB+'4 wheels'  (TAB
  964.                   |                    has ASCII-value 9)
  965.  
  966.        ╗ Strings for binary files
  967.  
  968.          When processing binary files,  like  programs,...,  most  strings
  969.          are C-strings. This means that at the end of the  string  a  NULL
  970.          character (ASCII 0)  is  found.  The  strings  aren't  C-strings,
  971.          since plain text files don't include NULL codes.
  972.  
  973.          In  order  to  make  sure  that  the  replace  string   is   NULL
  974.          terminated, you must  include  such  a  code  when  defining  the
  975.          string.  (Assuming  that  the  search   string   is   also   NULL
  976.          terminated.)
  977.  
  978.             | Assume we are processing a program, and at  a  certain  time
  979.             | it prints "string". 
  980.             | 'REPL string BY STR' -> the  program  will  print  "STRing",
  981.             |                         which wasn't our intention. 
  982.             | 'REPL string BY STR\o' -> now   the   program   will   print
  983.             |                           "STR" ('\o' inserts a NULL code).
  984.            
  985.          Suppose the string to search is found  two  times  in  the  file,
  986.          once NULL terminated and once not. If you only  want  to  replace
  987.          the NULL terminated one, then you must also include a  NULL  code
  988.          when defining your search string.
  989.  
  990.             | Assume we have two strings in a  program  :  "string\o"  and
  991.             | "this string of \o"
  992.             | 'REPL string\o BY STR\o' -> after  replacing  we  will  have
  993.             |                             "STR\o" and "this string of\o"
  994.             | 'REPL string BY STR\o' -> after  replacing  we   will   have
  995.             |                           "STR\o" and "this STR\o"
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.                                          PARex v3.0x User Manual - Page 16
  1024.  
  1025.        5. Search control.
  1026.  
  1027.        5.1. Case-sensitive searching.
  1028.  
  1029.          OptionCASECHECK
  1030.  
  1031.           ╗ By  default,  PARex uses a non-case  sensitive  search.  Using
  1032.             this option  forces  the  program  to  search  case-sensitive.
  1033.             This option has effect on all main commands!
  1034.  
  1035.               | default  : "hello" = "HeLLo", "heLLO", "HELLO", ...
  1036.               | CASECHECK: "hello" only equals "hello"
  1037.  
  1038.           NOTE: in previous versions, this option was called 'CASE'!
  1039.  
  1040.          Sub-cmdCASE
  1041.  
  1042.           ╗ With this sub-command you can make a  main-command  to  search
  1043.             case-sensitive. All other main-commands won't be  affected  by
  1044.             this.
  1045.  
  1046.                | 'PARex ram:src { REPL aa BY bb CASE } { REPL cc BY dd }'
  1047.                | This will replace two strings, the first string  (aa)  is
  1048.                | searched case-sensitive, while the second string (cc)  is
  1049.                | searched non-case-sensitive!
  1050.  
  1051.          Sub-cmdNOCASE
  1052.  
  1053.           ╗ The same as CASE, but now  to  make  the  main-command  search
  1054.             non-case sensitive.
  1055.  
  1056.           NOTE: using the CASECHECK  option,  which  works  on  all  main-
  1057.                 commands, will override this sub-command!
  1058.          
  1059.          Sub-cmdFIXCASE
  1060.  
  1061.           ╗ Using program options, such as  CASECHECK,  can  override  the
  1062.             effect of CASE and NOCASE sub-commands. To prevent  this  from
  1063.             happening, you must use the FIXCASE sub-command. 
  1064.            
  1065.               | { REPL aa BY bb NOCASE } : searches non-case sensitive.
  1066.               | If you would use CASECHECK,  then  PARex  would  start  to
  1067.               | search  case-sensitive  again.  Using  FIXCASE  will  make
  1068.               | sure  that PARex keeps searching non-case  sensitive  with
  1069.               | this command: { REPL aa BY bb NOCASE FIXCASE }.
  1070.  
  1071.        5.2. Wildcard searching.
  1072.  
  1073.          Sub-cmdWILD
  1074.  
  1075.           ╗ By  default  PARex will interprete the searchStr literally. In
  1076.             some cases, it's more useful to  search  with  wildcards.  The
  1077.             following wildcards are supported by PARex:
  1078.  
  1079.               - "#" : the character following occurs none or more times.
  1080.               - "?" : represents one character.
  1081.               - "*" : this is the true wildcard, and  is  equal  to  "#?".
  1082.                       Note that if you use  "#?",  PARex will translate it
  1083.                       into "*".
  1084.               - "'" : interprete  the  character  following  as  a  normal
  1085.  
  1086.  
  1087.                                          PARex v3.0x User Manual - Page 17
  1088.  
  1089.                       character, and not as a wildcard character.
  1090.               - "|" : allows defining of several patterns in one string.
  1091.  
  1092.         !! ╗ In order for a main-command to use these wildcards, you  must
  1093.              add the sub-command WILD to it, else the wildcards  would  be
  1094.              interpreted as normal characters.
  1095.  
  1096.                | ' PARex ram:src { REPL h#?o BY hi WILD } '
  1097.                | Will replace all strings  that  fall  under  the  pattern
  1098.                | "h#?o". So  "hello",  "ho"  or  "help  me  to"  would  be
  1099.                | replaced by "hi".
  1100.  
  1101.          WARNING: when doing wildcard searching, it's recommended  to  use
  1102.                   the LOAD option, especially with "#?" or  "*"  wildcards
  1103.                   since these can otherwise give wrong results.
  1104.  
  1105.          NOTE: you can use the supplied WildPARex  program  to  experiment
  1106.                with the use of wildcards.
  1107.  
  1108.          Usage: REPL <STR> BY <str> / STRIP <STR> TO <STR
  1109.                 CAP <STR> / DECAP <STR>
  1110.  
  1111.        5.3. Context remembering.
  1112.  
  1113.          Sub-cmdCONTEXT
  1114.  
  1115.           ╗ In  some  cases  it  could  be  interesting   to   save   some
  1116.             characters which fall under the searchStr,  in  order  to  use
  1117.             them again in  the  replStr.  The  CONTEXT  sub-command  makes
  1118.             this reality. Worth mentioning is  the  fact  that  this  sub-
  1119.             command will automatically set the WILD sub-command too.
  1120.  
  1121.           ╗ Upto twenty contexts can be remembered, for a  total  of  upto
  1122.             4096 bytes.  When  the  BUFFER  option  was  used,  then  this
  1123.             buffer will also be enlarged.  
  1124.  
  1125.           ╗ The following codes are  used  to  define  a  context  in  the
  1126.             searchStr : 
  1127.               - the opening curly bracket ("{") to open a context;
  1128.               - the closing curly bracket ("}") to close a context.
  1129.             All characters that fall between  these  curly  brackets  will
  1130.             be remembered.  
  1131.  
  1132.                | ' h{#?}o ' would remember "ell"  if  "hello"  was  found,
  1133.                | or "elp this t" when "help this to" was found... 
  1134.  
  1135.             Any  wildcards  or  characters  can  be  used  between   these
  1136.             context codes. An empty context like  "{}"  is  translated  to
  1137.             "{#?}" by PARex.
  1138.  
  1139.                | Some examples: {p#?x}, p{#A??}x, pa{#?#x}, p{}x, ...
  1140.  
  1141.           ╗ To insert the saved characters in the replStr,  you  type  the
  1142.             two curly brackets at the  desired  place,  thus  "{}".  Every
  1143.             "{}" in the replStr corresponds  to  the  defined  context  in
  1144.             the searchStr. Thus  the  second  "{}"  in  the  replStr  will
  1145.             insert the characters which were saved in the  second  context
  1146.             of the searchStr.
  1147.  
  1148.                | the replStr "H{}I" would be like  "HellI"  if  "ell"  was
  1149.  
  1150.  
  1151.                                          PARex v3.0x User Manual - Page 18
  1152.  
  1153.                | remembered, and like "Help this tI" if "elp this  t"  was
  1154.                | remembered... 
  1155.  
  1156.                | ' PARex ram:src { REPL  "PROCEDURE  {#?}\n"  BY  "ROUTINE
  1157.                | {}\n '  would  convert  "PROCEDURE  Print(str:  ARRAY  OF
  1158.                | CHAR)\n" TO "ROUTINE Print(str: ARRAY OF CHAR)\n"; ...
  1159.  
  1160.           ╗ If you want to  insert  a  curly  bracket  as  a  normal  text
  1161.             character, and not as a context code, you must preceed  it  by
  1162.             the literal wildcard code "'"!
  1163.  
  1164.          Usage: REPL <STR> BY <str> / STRIP <STR> TO <STR
  1165.                 CAP <STR> / DECAP <STR>
  1166.  
  1167.        5.4. Word-only searching.
  1168.  
  1169.          Sub-cmdWORD
  1170.  
  1171.           ╗ By default PARex will just search  for  a  string,  regardless
  1172.             if this string is a word or part of  a  word.  In  some  cases
  1173.             only words may be replaced.  To  make  sure  that  PARex  only
  1174.             finds words, you must use the WORD sub-command.
  1175.  
  1176.                | ' { REPL hi BY hello  WORD  }  ';  this  main-command  is
  1177.                | only executed if "hi" is found as  a  word,  and  not  as
  1178.                | part of a word. Thus "ships" won't do, but " hi " will.
  1179.  
  1180.           ╗ A string is regarded as a word, if  the  ASCII  value  of  the
  1181.             character  before  the string, and  the  ASCII  value  of  the
  1182.             character after the  string  fall  in  one  of  the  following
  1183.             ranges :
  1184.  
  1185.                -   0..47
  1186.                -  58..63
  1187.                -  91..96
  1188.                - 123..191  
  1189.  
  1190.          Usage: REPL <STR> BY <str> / STRIP <STR> TO <STR
  1191.                 CAP <STR> / DECAP <STR>
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.                                          PARex v3.0x User Manual - Page 19
  1216.  
  1217.        6. Program variables.
  1218.  
  1219.        ╗ As of version 3 some variables  are  supported.  These  variables
  1220.          can be anywhere in the searchStr or replStr. They can be  divided
  1221.          in two types : fixed  variables  and  volatile  variables.  While
  1222.          fixed variables can  be  used  in  both  the  searchStr  and  the
  1223.          replStr, volatile variables are only allowed in the replStr.
  1224.  
  1225.          Fixed variables are variables where the value is  defined  before
  1226.          the source  file  is  processed,  while  the  value  of  volatile
  1227.          variables is only known at the time of  replacing  the  searchStr
  1228.          by the replStr. 
  1229.  
  1230.          These variables are inserted in  the  searchStr  or  the  replStr
  1231.          between two "&" characters.  Everything  between  such  ampersand
  1232.          characters is regarded as being part of the variable.
  1233.  
  1234.          NOTE: if you want to insert "&" characters as normal  text,  then
  1235.                you must use "\&".
  1236.  
  1237.        ╗ These variables can be used in all the  main  commands,  so  with
  1238.          INIT, CLOSE, REPL, STRIP, CAP and DECAP!
  1239.  
  1240.        ╗ The strings in which you can use  a  variable,  are  accented  in
  1241.          bold text in the "Usage:" line.
  1242.  
  1243.        6.1. PARex information.
  1244.  
  1245.          Variable&NAME&
  1246.  
  1247.           ╗ Inserts the  name  of  the  program  (thus  "PARex"),  in  the
  1248.             string.
  1249.  
  1250.               | ' PARex ram:source REPL ">&NAME&<" BY "xeRAP" '
  1251.               | Replaces all ">PARex<"  strings  in  the  source  file  by
  1252.               | "xeRAP".
  1253.  
  1254.          Variable&VERSION&
  1255.  
  1256.           ╗ Inserts the version of PARex in the string.
  1257.  
  1258.               | ' PARex ram:source REPL "v&VERSION&" BY "V=&VERSION&" '
  1259.               | Replaces  all  "v3.00"  strings  in  the  source  file  by
  1260.               | "v=3.00".
  1261.  
  1262.          Usage: INIT <STR> / CLOSE <STR> / CAP <STR> / DECAP <STR>
  1263.                 REPL <STR> BY <STR> OR <STR> / STRIP <STR> TO <STR>
  1264.         
  1265.        6.2. Inserting files.
  1266.  
  1267.          Variable&FILE:<name>&
  1268.  
  1269.           ╗ With this variable you  can  insert  a  file  in  the  desired
  1270.             place in the string. You can use  as  many  &FILE:&  variables
  1271.             in a string as you want. The name of the  file  to  insert  is
  1272.             given directly after the  colon.  No  double  quotation  marks
  1273.             have to be used if the filename  should  include  spaces,  but
  1274.             remember  to  enclose  the  entire   string   between   double
  1275.             quotation marks!
  1276.  
  1277.  
  1278.  
  1279.                                          PARex v3.0x User Manual - Page 20
  1280.  
  1281.           ╗ This variable can for example be used to insert the  value  of
  1282.              environment variables!
  1283.            
  1284.               | SETENV test xerap
  1285.               | ' PARex ram:src REPL parex BY file->&FILE:env:test& '
  1286.               | This will replace  all  "parex"  strings  in  the  ram:src
  1287.               | file with "file->xerap".
  1288.  
  1289.           WARNING: if the file can't be found then "<file not  found>"  is
  1290.                    inserted in the string instead.
  1291.  
  1292.          Usage: INIT <STR> / CLOSE <STR> / REPL <str> BY <STR> OR <STR
  1293.  
  1294.        6.3. Inserting date and time.
  1295.  
  1296.          Variable&FIXTIME:[<formatstr>]&
  1297.  
  1298.           ╗ This variable will insert the time, where  the  used  time  is
  1299.             the one at program startup. If  no  format  string  is  given,
  1300.             then the  default  AmigaDOS  format  (dd-mmm-yy  hh:mm:ss)  is
  1301.             used.
  1302.  
  1303.               | ' PARex ram:source REPL parex BY date=&FIXTIME:& '
  1304.               | All  "parex"  strings  in  the  ram:source  file  will  be
  1305.               | replaced by e.g. "date=20-Nov-93 22:43:42"
  1306.  
  1307.           ╗ The following format codes can be used to construct  a  custom
  1308.             formatted timestring:
  1309.  
  1310.              DATE CODES : %w -> a two character day name ('Mo'..'Su')
  1311.                           %W -> the full day name ('Monday'..'Sunday')   
  1312.                           %d -> two digit day in month (00..31)   
  1313.                           %m -> two digit month (01..12)   
  1314.                           %M -> short month name ('Jan'..'Dec')   
  1315.                           %O -> full month name ('Januray'..'December')
  1316.                           %y -> two digit year (e.g. '93')   
  1317.                           %Y -> four digit year (e.g. '1998')
  1318.           
  1319.              TIME CODES : %h -> hours in 12 hour mode (00..11)   
  1320.                           %H -> hours in 24 hour mode (00..23)   
  1321.                           %i -> minutes (00..59)   
  1322.                           %s -> seconds (00..59)   
  1323.                           %T -> 'AM' or 'PM'   
  1324.  
  1325.              DATESTAMP  : %D -> days since 1-jan-78
  1326.                           %U -> minutes since 00:00:00
  1327.                           %I -> ticks since last minute 
  1328.  
  1329.               | 'PARex ram:src REPL prx BY "date=&FIXTIME:%W, %d %O %Y&" 
  1330.               | All  "parex"  strings  in  the  ram:source  file  will  be
  1331.               | replaced by e.g. "date=Saturday, 20 November 1993".
  1332.  
  1333.             NOTE: these format codes are interpreted case-sensitive!
  1334.  
  1335.          Usage: INIT <STR> / CLOSE <STR> / CAP <STR> / DECAP <STR>
  1336.                 REPL <STR> BY <STR> OR <STR> / STRIP <STR> TO <STR>
  1337.         
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.                                          PARex v3.0x User Manual - Page 21
  1344.  
  1345.          Variable&TIME:[<formatstr>]&
  1346.  
  1347.           ╗ The same as &FIXTIME:&, but now the time used is  the  one  at
  1348.             the moment the string is used! 
  1349.  
  1350.          Usage: INIT <STR> / CLOSE <STR> / REPL <str> BY <STR> OR <STR
  1351.         
  1352.        6.4. Inserting path and name of source & destination file.
  1353.  
  1354.          Variable&SRCPATH& and &SRCNAME&
  1355.  
  1356.           ╗ Inserts the path  and/or  name  of  the  source  file  in  the
  1357.             string.
  1358.  
  1359.               | ' PARex RAM:source PRT INIT \e[1m&SRCNAME&\e[0m\n\n '
  1360.               | This will send ram:source to the printer,  where  first  a
  1361.               | line in bold text is printed with the  name  of  the  file
  1362.               | to print.
  1363.  
  1364.          Variable&DSTPATH& and &DSTNAME&
  1365.  
  1366.           ╗ Inserts the path and/or name of the destination  file  in  the
  1367.             string.
  1368.  
  1369.               | 'PARex ram:src TO ram:dest INIT &DSTPATH&->&DSTNAME&\n'
  1370.               | This will copy ram:src to ram:dest, where the  first  line
  1371.               | of the ram:dest file will be "ram:->dest".
  1372.  
  1373.          Usage: INIT <STR> / CLOSE <STR> / REPL <str> BY <STR> OR <STR>
  1374.         
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.                                          PARex v3.0x User Manual - Page 22
  1408.  
  1409.        7. Using PARex data scripts.
  1410.  
  1411.        Using the main-commands on the command line  has  its  limitations.
  1412.        For example, using one or two  main-commands  gives  now  problems,
  1413.        but suppose you'll need to use  more  than  twenty  commands!  Then
  1414.        it's better to put these main-commands in a script.
  1415.  
  1416.        7.1. Setting up scripts.
  1417.  
  1418.           ╗ PARex scripts, like AmigaDOS scripts, are  plain  text  files,
  1419.             that can be created and edited with any texteditor. 
  1420.  
  1421.           ╗ A comment is  inserted  in  the  same  way  as  with  AmigaDOS
  1422.             scripts. Thus everything after a semi-colon upto  the  end  of
  1423.             the line is regarded as the comment.  You  may  type  comments
  1424.             on the same line as the command.
  1425.  
  1426.                | ' REPL aa BY bb ; this is the comment '
  1427.  
  1428.           ╗ Only one main-command (including  all  its  sub-commands)  can
  1429.             be typed on a line. 
  1430.  
  1431.                | REPL a#?a BY bb OR cc WHEN name CASE WILD
  1432.  
  1433.           ╗ You  can  type  them  on  several  lines   by     using  curly
  1434.             brackets, just as you do on the command line.  In    this case
  1435.             everything after an opening curly bracket upto  the    closing
  1436.             curly  bracket  is  regarded  as  being  part  of  the   main-
  1437.             command. There's one  limitation,  when  a  command  needs  an
  1438.             argument, then both the keyword and the argument  must  be  on
  1439.             the same line!
  1440.  
  1441.                | ' { REPL aa BY bb         ; comments are allowed here
  1442.                |       OR cc WHEN name     ; another comment
  1443.                |       CASE
  1444.                |       CAP } '             ; even here!
  1445.  
  1446.        7.2. Script commands.
  1447.  
  1448.        If needed, you can divide your data script  in  blocks,  which  can
  1449.        then  be  selected  later  from  the  PARex program. The  following
  1450.        commands allow you to do this.
  1451.  
  1452.          CommandGLOBAL
  1453.  
  1454.           ╗ This block of replace commands will be used when you  use  the
  1455.             following options at program  startup  :  GLOBAL  or  ALL. The
  1456.             end of the block is reached when  a  the  MODE  or  a  EXITPXS
  1457.             command is found.
  1458.  
  1459.           ╗ A GLOBAL block can only be defined once in a script!
  1460.  
  1461.          CommandMODE <name>
  1462.  
  1463.           ╗ This command also defines a block  of  replace  commands,  but
  1464.             now the block is named. As many MODE commands can be  used  as
  1465.             needed. Such a block  can  only  be  selected  with  the  MODE
  1466.             (command line) option at  program  startup.  The  name  (or  a
  1467.             pattern) given with the MODE  option  at  program  startup  is
  1468.             used to  search  for  the  corresponding  MODE  block  in  the
  1469.  
  1470.  
  1471.                                          PARex v3.0x User Manual - Page 23
  1472.  
  1473.             script.
  1474.  
  1475.               | Suppose we have the following script :
  1476.               | ' MODE test
  1477.               |     REPL aa BY bb 
  1478.               |     REPL cc BY dd 
  1479.               |   MODE text
  1480.               |     REPL oo BY pp 
  1481.               |     REPL uu BY vv '
  1482.               | Using   ' PARex ram:source MODE text '  will  convert  the
  1483.               | source file with "REPL oo BY pp" and "REPL uu BY vv".
  1484.               | Using   ' PARex   ram:source MODE  te?t ' would  use  both
  1485.               | MODEs since the pattern name "te?t"  matches  both  "test"
  1486.               | and "text".
  1487.  
  1488.           ╗ As with the GLOBAL command, the  block  is  ended  by  another
  1489.             MODE command, a GLOBAL command or a EXITPXS command.
  1490.  
  1491.          CommandEXITPXS
  1492.  
  1493.           ╗ This  command  informs  PARex that it can  stop  scanning  the
  1494.             script. This means  that  everything  after  this  command  is
  1495.             ignored by PARex,  provided  the  block  of  replace  commands
  1496.             where EXITPXS belongs to is used.
  1497.  
  1498.               | Suppose we have the following script :
  1499.               | ' MODE test
  1500.               |     REPL aa BY bb 
  1501.               |     REPL cc BY dd 
  1502.               |     EXITPXS
  1503.               |   MODE text
  1504.               |     REPL oo BY pp 
  1505.               |     REPL uu BY vv 
  1506.               |     EXITPXS '
  1507.               | Using  ' PARex  ram:source MODE  text ' would only use the
  1508.               | "text" mode. The first EXITPXS has no effect  since  PARex
  1509.               | wasn't  reading  that  block  of  replace  commands!   The
  1510.               | second EXITPXS had effect since its block was read.
  1511.  
  1512.        7.3. Script options.
  1513.  
  1514.          OptionSCRIPT <file[.pxs]>
  1515.  
  1516.           ╗ Uses the named  script  file.  It's  not  needed  to  add  the
  1517.             ".pxs" suffix,  since  PARex  will  do  this  for  you  if  it
  1518.             couldn't open the file under the given name. 
  1519.  
  1520.          OptionNOSCRIPT
  1521.  
  1522.           ╗ Forces PARex not to  open  a  scriptfile.  Primarily  used  in
  1523.             earlier    versions of   PARex   to   disable   the    default
  1524.             "S:PARex.pxs" script usage.
  1525.  
  1526.          OptionGLOBAL
  1527.  
  1528.           ╗ Selects the GLOBAL block of a script.
  1529.  
  1530.           ╗ If  no  script  file   was   specified,   then   the   default
  1531.             "S:PARex.pxs" is used (if present).
  1532.  
  1533.  
  1534.  
  1535.                                          PARex v3.0x User Manual - Page 24
  1536.  
  1537.          OptionMODE <name|pattern>
  1538.  
  1539.           ╗ Selects the named  MODE  block(s).  As  mentioned  above,  the
  1540.             name can be a pattern.
  1541.  
  1542.           ╗ If  no  script  file   was   specified,   then   the   default
  1543.             "S:PARex.pxs" is used (if present).
  1544.  
  1545.          OptionALL
  1546.  
  1547.           ╗ Selects all replace commands in a scripts, thus  ignoring  the
  1548.             MODE and GLOBAL script commands.  But  the  EXITPXS  is  still
  1549.             recognised!
  1550.  
  1551.           ╗ If  no  script  file   was   specified,   then   the   default
  1552.             "S:PARex.pxs" is used (if present).
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.                                          PARex v3.0x User Manual - Page 25
  1600.  
  1601.        8. Additional sub-commands.
  1602.  
  1603.        In this chapter the rest of the sub-commands  are  explained.  They
  1604.        give  more  control  over  the  searching  and  over  the  replStr.
  1605.        Remember that a sub-command only affects one  main-command,  except
  1606.        when they're being used as a global working (command line)  option.
  1607.        The latter is explained in point 8.5.
  1608.  
  1609.        8.1. Limit replacing.
  1610.  
  1611.        By  default  PARex  will  replace  every  string  that  matches   a
  1612.        searchStr. The  following  sub-commands  can  alter  this.  In  the
  1613.        example "N" (no replace) and "Y" (replace) are used to explain  the
  1614.        function. These sub-commands are supported by REPL, STRIP, CAP  and
  1615.        DECAP.
  1616.  
  1617.          Sub-cmdTIMES <#>
  1618.  
  1619.           ╗ The searchStr will only be used the given number of times.
  1620.  
  1621.                | ' REPL hello BY hi TIMES 5 ' -> Y Y Y Y Y N N N...
  1622.  
  1623.          Sub-cmdEVERY <#>
  1624.  
  1625.           ╗ The searchStr will only be replaced every 'x'th occurence.
  1626.  
  1627.                | ' REPL hello BY hi EVERY 2 ' -> N Y N Y N Y...
  1628.  
  1629.          Sub-cmdAFTER <#>
  1630.  
  1631.           ╗ Only replace the searchStr after the 'x'th occurence.
  1632.  
  1633.                | ' REPL hello BY hi AFTER 3 TIMES 2 ' -> N N N Y Y N...
  1634.  
  1635.        8.2. Defining the size of the replace string.
  1636.  
  1637.        The size of the string that replaces  the  searchStr  can  also  be
  1638.        altered. 
  1639.  
  1640.        ╗ The following sub-commands relate the size of the replStr to  the
  1641.          size of the searchStr. These commands are useful when working  on
  1642.          binary files, where you don't want  to  insert  a  string  larger
  1643.          than the searchStr, since  this  can  have  disasterous  effects.
  1644.          They're only supported with the REPL command.
  1645.  
  1646.          Sub-cmdFIT
  1647.  
  1648.           ╗ This command makes sure that the  length  of  the  replStr  is
  1649.             not longer than the found string to replace.  If  the  replStr
  1650.             is shorter, then nothing is done.
  1651.  
  1652.               | ' REPL hi BY hello FIT ' will replace "hi"  by  "he",  not
  1653.               | "hello", since it's too long. 
  1654.  
  1655.          Sub-cmdZERO
  1656.  
  1657.           ╗ This command makes sure that the  length  of  the  replStr  is
  1658.             as long as the found string to  replace.  Should  the  replStr
  1659.             be shorter, then it's appended with ASCII NULL codes  (or  the
  1660.             code defined with LEFTFILL or RIGHTFILL). If  the  replStr  is
  1661.  
  1662.  
  1663.                                          PARex v3.0x User Manual - Page 26
  1664.  
  1665.             longer, than nothing is done.
  1666.  
  1667.               | ' REPL hello BY hi ZERO '   will   replace   "hello"    by
  1668.               | "hi\o\o\o" (note that "\o' is used here to  represent  the
  1669.               | NULL code). 
  1670.  
  1671.          TIP: if working on binary files, always use FIT and ZERO to  play
  1672.               safe!
  1673.  
  1674.        The following two sub-commands define  directly  the  size  of  the
  1675.        replStr. Here the size is directly defined, and  thus  not  related
  1676.        to the searchStr! These commands won't work when  FIT  or  ZERO  is
  1677.        used! These sub-commands are supported with INIT, CLOSE and REPL.
  1678.  
  1679.          Sub-cmdMINSIZE <# bytes>
  1680.  
  1681.           ╗ Defines that the replStr must hold at least the  given  number
  1682.             of bytes. If this  isn't  the  case,  then  the  replStr  will
  1683.             appended  with  ASCII  NULL  codes  (or  the code defined with
  1684.             LEFTFILL or RIGHTFILL). Should  the  string  be  longer,  then
  1685.             nothing is done. 
  1686.  
  1687.               | ' REPL hello BY hi MINSIZE  4 ' will  replace  "hello"  by
  1688.               | "hi\o\o" (note that "\o' is used  here  to  represent  the
  1689.               | NULL code). 
  1690.  
  1691.          Sub-cmdMAXSIZE <# bytes>
  1692.  
  1693.           ╗ Defines the maximum size that the replStr may  have.  If  it's
  1694.             longer then only the given  number  of  bytes  are  used,  the
  1695.             rest is ignored. Should the replStr be shorter,  then  nothing
  1696.             is done.
  1697.  
  1698.               | ' REPL hi BY hello MAXSIZE   3 '  will  replace  "hi"   by
  1699.               | "hel". 
  1700.  
  1701.        The  following  two  sub-commands  define  if  we  need  to  insert
  1702.        characters at the beginning of the replStr, or at the  end  of  it.
  1703.        The code used for inserting  or  appending  is  also  defined  with
  1704.        these commands. These commands are supported with INIT,  CLOSE  and
  1705.        REPL.
  1706.  
  1707.          Sub-cmdLEFTFILL|RIGHTFILL <0..255>
  1708.  
  1709.           ╗ If the replStr needs to  be  appended  (in  case  of  ZERO  or
  1710.             MINSIZE) then by default PARex  appends  at  the  end  of  the
  1711.             string with  ASCII  NULL  codes.  These  commands  can  change
  1712.             this. The code to  append  with  must  be  given  as  a  value
  1713.             between 0 and 255. This value can be  given  in  decimal  (can
  1714.             be introduced with \d), in hexadecimal  (introduced  with  \x)
  1715.             or in octal (introduced with \o).
  1716.  
  1717.           ╗ LEFTFILL will lengthen the replStr  by  inserting  the  needed
  1718.             bytes at the beginning, while RIGHTFILL will do  this  at  the
  1719.             end of the string.
  1720.  
  1721.               | ' REPL hello BY hi MINSIZE  5 LEFTFILL \d64' will  replace
  1722.               | "hello" by "@@@hi" 
  1723.  
  1724.  
  1725.  
  1726.  
  1727.                                          PARex v3.0x User Manual - Page 27
  1728.  
  1729.           WARNING: the  LEFTFILL  sub-command  doesn't   work   when   the
  1730.                    HEXDUMP option is used!
  1731.  
  1732.        8.3. Case conversion.
  1733.  
  1734.        The following sub-commands are supported by REPL, STRIP,  INIT  and
  1735.        CLOSE.
  1736.  
  1737.          Sub-cmdCAP|DECAP
  1738.  
  1739.           ╗ Will put all text of the replStr (including  all  bytes  which
  1740.             come from the program variables) into upper  case  (with  CAP)
  1741.             or into lower case (with DECAP) characters.
  1742.  
  1743.                | ' REPL aa BY hi CAP ' will replace "hello" by "HI"
  1744.  
  1745.                | ' REPL aa BY HI DECAP ' will replace "hello" by "hi"
  1746.  
  1747.        8.4. Making sub-commands to work on all main-commands.
  1748.  
  1749.           ╗ In some cases you'll want to make a sub-command  effective  on
  1750.             all used main-commands. To do this, you must  enter  the  sub-
  1751.             command as a program (command line)  option,  and  before  any
  1752.             main-command!
  1753.  
  1754.           ╗ In order to be sure that a sub-command  is  interpreted  as  a
  1755.             global working  option,  then  it's  best  to  place  a  main-
  1756.             command  (if  used  on  the  command   line)   between   curly
  1757.             brackets. 
  1758.  
  1759.               | ' PARex ram:src TIMES 2 { REPL aa BY bb TIMES 5 } '
  1760.               | You'll see that  TIMES  is  used  twice,  but  the  second
  1761.               | TIMES sub-command is ignored, since  the  first  (TIME  2)
  1762.               | one works globally!
  1763.  
  1764.           ╗ The following sub-commands  can  be  made  to  work  globally:
  1765.             CAP,  DECAP,  WILD,  CONTEXT,  NEST,   FIT,   ZERO,   MINSIZE,
  1766.             MAXSIZE, LEFTFILL, RIGHTFILL, TIME, EVERY, AFTER and WORD.
  1767.               
  1768.         
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.                                          PARex v3.0x User Manual - Page 28
  1792.  
  1793.        9. Option reference.
  1794.  
  1795.          ALL ....................................................... 25
  1796.          AFTER <#> ............................................. 26, 28
  1797.          BUFFER <# bytes> ..........................................  6
  1798.          CAP ....................................................... 28
  1799.          CASECHECK ................................................. 17
  1800.          CONTEXT ............................................... 18, 28
  1801.          CONVERT ...................................................  5
  1802.          DECAP ..................................................... 28
  1803.          EVERY <#> ............................................. 26, 28
  1804.          FIT ................................................... 26, 28
  1805.          [FROM] <file|dir|pattern> .................................  4
  1806.          GLOBAL .................................................... 24
  1807.          HEXDUMP [<fmtstr>] ........................................  7
  1808.          LCASE .....................................................  8
  1809.          LEFTFILL <0.255> ...................................... 27, 28
  1810.          LOAD ................................................... 6, 18
  1811.          MAXSIZE <# bytes> ..................................... 27, 28
  1812.          MINSIZE <# bytes> ..................................... 27, 28
  1813.          MODE <name|pattern]> .................................. 23, 25
  1814.          NEST .................................................. 13, 28
  1815.          NOSCRIPT .................................................. 24
  1816.          NOVERSION ................................................. 10
  1817.          PAR .......................................................  5
  1818.          PRT .......................................................  5
  1819.          READ <# bytes> ............................................  5
  1820.          RIGHTFILL <0.255> ..................................... 27, 28
  1821.          SCRIPT <file[.pxs]> ....................................... 24
  1822.          SER .......................................................  5
  1823.          SILENT .................................................... 10
  1824.          STAT ......................................................  9
  1825.          TIMES <#> ............................................. 26, 28
  1826.          [TO] <file|dir> ...........................................  4
  1827.          TOUCH <# bytes> ...........................................  5
  1828.          TRACE .....................................................  9
  1829.          UCASE .....................................................  8
  1830.          WHEN <name|pattern> ....................................... 12
  1831.          WILD .............................................. 17, 18, 28
  1832.          WORD .................................................. 19, 28
  1833.          ZERO .................................................. 26, 28
  1834.  
  1835.          [{] CAP   <str> [<cmds> }] ................................ 14
  1836.          [{] CLOSE <str> [<cmds> }] ................................ 12
  1837.          [{] DECAP <str> [<cmds> }] ................................ 14
  1838.          [{] INIT  <str> [<cmds> }] ................................ 11
  1839.          [{] REPL  <str> BY <str> [<cmds> }] ....................... 12
  1840.          [{] STRIP [+|-]<str> TO [+|-]<str> [<cmds> }] ............. 13
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.                                          PARex v3.0x User Manual - Page 29
  1856.  
  1857.        10. Command reference.
  1858.  
  1859.        10.1. Main commands.
  1860.  
  1861.          CAP <str> ................................................. 14
  1862.                [WILD] [WORD] [TIMES <#>] [EVERY <#>] [AFTER <#>] 
  1863.                [CASE] [NOCASE] [FIXCASE]
  1864.  
  1865.          CLOSE <str> ............................................... 12
  1866.                [CAP|DECAP] [MINSIZE <# bytes>] [MAXSIZE <# bytes>]
  1867.                [LEFTFILL|RIGHTFILL <0..255>]
  1868.  
  1869.          DECAP <str> ............................................... 14
  1870.                [WILD] [WORD] [TIMES <#>] [EVERY <#>] [AFTER <#>] 
  1871.                [CASE] [NOCASE] [FIXCASE]
  1872.  
  1873.          INIT <str> ................................................ 11
  1874.                [CAP|DECAP] [MINSIZE <# bytes>] [MAXSIZE <# bytes>]
  1875.                [LEFTFILL|RIGHTFILL <0..255>]
  1876.  
  1877.          REPL <str> BY <str> ....................................... 12
  1878.                [OR <str> WHEN <name>] [WILD] [WORD] [CONTEXT] 
  1879.                [TIMES <#>] [EVERY <#>] [AFTER <#>] [CASE] 
  1880.                [NOCASE] [FIXCASE] [CAP|DECAP] [FIT] [ZERO] 
  1881.                [MINSIZE <# bytes>] [MAXSIZE <# bytes>]
  1882.                [LEFTFILL|RIGHTFILL <0..255>]
  1883.  
  1884.          STRIP [+|-]<str> TO [+|-]<str> ............................ 13
  1885.                [NEST] [WILD] [WORD] [TIMES <#>] [EVERY <#>]
  1886.                [AFTER <#>] [CASE] [NOCASE] [FIXCASE] [CAP|DECAP]
  1887.  
  1888.        10.2. Sub-commands.
  1889.  
  1890.          AFTER <#> ................................................. 26
  1891.          CAP ....................................................... 28
  1892.          CASE ...................................................... 17
  1893.          CONTEXT ................................................... 18
  1894.          DECAP ..................................................... 28
  1895.          EVERY <#> ................................................. 26
  1896.          FIT ....................................................... 26
  1897.          FIXCASE ................................................... 17
  1898.          LEFTFILL <0.255> .......................................... 27
  1899.          MAXSIZE <# bytes> ......................................... 27
  1900.          MINSIZE <# bytes> ......................................... 27
  1901.          NEST ...................................................... 13
  1902.          NOCASE .................................................... 17
  1903.          RIGHTFILL <0.255> ......................................... 27
  1904.          TIMES <#> ................................................. 26
  1905.          WHEN <name> ............................................... 12
  1906.          WILD .................................................. 17, 18
  1907.          WORD ...................................................... 19
  1908.          ZERO ...................................................... 26
  1909.  
  1910.        10.3. Script-commands.
  1911.  
  1912.          EXITPXS ................................................... 24
  1913.          GLOBAL .................................................... 23
  1914.          MODE <name> ............................................... 23
  1915.  
  1916.  
  1917.  
  1918.  
  1919.                                          PARex v3.0x User Manual - Page 30
  1920.  
  1921.        11. Variables.
  1922.  
  1923.          NAME ...................................................... 20
  1924.          VERSION ................................................... 20
  1925.          FILE:<name> ............................................... 20
  1926.          FIXTIME:[<formatstr>] ..................................... 21
  1927.          TIME:[<formatstr>] ........................................ 22
  1928.          SRCNAME ................................................... 22
  1929.          SRCPATH ................................................... 22
  1930.          DSTNAME ................................................... 22
  1931.          DSTPATH ................................................... 22
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.                                          PARex v3.0x User Manual - Page 31
  1984.