home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / MOUSEDIR.ZIP / REXXREF2.DOC < prev    next >
Text File  |  1992-03-16  |  3KB  |  74 lines

  1. REXXREF <target <(options>>
  2.  
  3. This KEDIT macro reformats and cross references Rexx and Kexx files.
  4. SAAREXX (OS/2 Rexx) required.
  5.  
  6. Target:
  7.   (null)                  - process all lines.  This is the default.
  8.                             Target cannot be null when options are
  9.                             specified.
  10.  
  11.   ALL                     - same as null.
  12.  
  13.   n                       - process n lines.
  14.  
  15.   an XEDIT target         - If the target is a delimited string and
  16.                             options have been specified, the string
  17.                             must be delimited on both left and right.
  18.  
  19. Options (minimum abbrev in upper case, default first):
  20.  
  21.   INdent nn         -    Number of spaces to indent loops. Default is 3.
  22.  
  23.   LM or LEftmargin nn  - Create left margin such that the first non-
  24.                          comment line begins in column 'nn'.  Useful
  25.                          when REXXREFing subsections of a program.
  26.  
  27.   RM or RIghtmargin nn - Column for right-aligning comments.
  28.                          Default is 73.
  29.  
  30.   REFresh nn           - Refresh screen after nn lines processed.
  31.                          Default is MIN(50,size.1()).  Use 0 to
  32.                          never refresh.
  33.  
  34.   NOXref / Xref        - Don't generate/generate a cross reference.
  35.  
  36.   Lines containing 'DO' or 'SELECT' are indented, while lines
  37.   containing 'END' are un-indented.  Continuation lines are indented
  38.   additional space(s).  Lines after hanging 'THEN' or 'ELSE' are also
  39.   indented.  Indenting is supressed for lines beginning with a label.
  40.  
  41.   Lines begining with '/*' will be left alone.  Where possible, lines
  42.   which end in a comment ('*/'), and which also contain executable
  43.   statements (like a comment at the end of a line), will be adjusted
  44.   so that the '/' will fall in the 'RIGHTCOLUMN' column.
  45.  
  46.   Keywords are not scanned exactly as the language specifies.  'FUZZ',
  47.   for example, is always considered a keyword, not just when it
  48.   follows 'NUMERIC'.  Keywords are checked for last, in case a label
  49.   or function has the same name as a keyword.  Keywords are normally
  50.   changed to lower case.
  51.  
  52.   Builtin functions are treated as keywords.
  53.  
  54. The CROSS REFERENCE
  55.  
  56.   The cross reference has three parts.  The first part lists the
  57.   variables in alphabetical order (by the first 22 characters) and
  58.   each line on which they were found.  If the variable appeared more
  59.   than once on a line, then that line number will be repeated.  Line
  60.   numbers where the variable was the first token are preceeded by an
  61.   '*' (these are assumed to be variable assignments).
  62.  
  63.   The second part lists the labels.  The line number where they are
  64.   defined is preceeded by an '*'.
  65.  
  66.   The third part lists the functions.  A name may appear as both a
  67.   label and a function, and for those that do, the line number where
  68.   the function is defined is preceeded by an '*' and prefixed to the
  69.   FUNCTIONs list.
  70.  
  71.   The CROSS REFERENCE is formatted as a REXX comment block and appended
  72.   to the source file.
  73.  
  74.