home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / fortran / library / tidy621 / tidyhelp.cms < prev    next >
Text File  |  1990-05-21  |  10KB  |  240 lines

  1. .cm Local Help
  2.  
  3. The NEWTIDY program renumbers and otherwise cleans up old and tired
  4. FORTRAN source programs.  NEWTIDY accepts ANSI FORTRAN with 19
  5. continuation cards as well as some IBM and CDC dialect FORTRAN
  6. statements. It is designed to work with ANSI FORTRAN-77, and will
  7. also accept FORTRAN II and FORTRAN IV statements. Certain
  8. FORTRAN II statements (such as READ INPUT TAPE) are automatically
  9. translated to their FORTRAN IV equivalents.  All lower case
  10. alphabetic characters are translated to upper case except for
  11. those in strings, Hollerith constants, and comment statements.
  12.  
  13. It is executed by:
  14.  
  15.           NEWTIDY FILENAME FILETYPE FILEMODE
  16.  
  17. where
  18.  
  19.           filename     is the name of the file containing the FORTRAN
  20.                        source
  21.  
  22.           filetype     is the type of the file containing the FORTRAN
  23.                        source
  24.  
  25.           filemode     is the mode of the file containing the FORTRAN
  26.                        source
  27.  
  28. The user can also have a file of TIDY control cards on the same disk as
  29. the FORTRAN source program.  This file, if used, is named:
  30.  
  31.           PROFILE TIDY filemode
  32.  
  33. TIDY produces two files:
  34.  
  35.       filename TIDYLIST filemode   containing a diagnostic listing
  36.                                    from the TIDY run
  37.  
  38.       filename TIDYFORT filemode   containing the cleaned up FORTRAN
  39.                                    source from the TIDY run
  40.  
  41. TIDY uses two scratch files which are deleted at the end of the run:
  42.  
  43.       $SCRTCH1 TIDYFILE filemode
  44.       $SCRTCH2 TIDYFILE filemode
  45.  
  46. II.  TIDY Control Cards:
  47.  
  48. TIDY has certain commands which control the program's operation
  49. and output file formats. These commands may occur in the user's
  50. control file, or anywhere in the FORTRAN source file, and may be
  51. used to negate a previous command. Default settings are listed
  52. where meaningful.
  53.  
  54. TIDY commands must begin with an asterisk in column 1.  The
  55. remainder of the command consists of a four-letter keyword and
  56. possibly an equal sign followed by a numeric or alphabetic
  57. argument.  Commands are negated by prefacing the keyword with the
  58. letters NO.
  59.  
  60. The commands which control statement numbering, indentation, and
  61. serial numbering are grouped separately, followed by
  62. miscellaneous commands.
  63.  
  64. II.1.  Statement number control:
  65.  
  66. TIDY numbers all statements in increasing order.  The user can
  67. specify the starting number for each routine, and the increment
  68. between statement numbers.  Additionally, the statement numbers
  69. can be left- or right-justified as desired.  The commands
  70. controlling statement numbering are:
  71.  
  72. Command                         Description
  73. *******                         ***********
  74. *LEFT=n.        Left adjust statement numbers to column n. *RIGHT
  75. *RIGHT=n.       right adjusts statement numbers to end in column
  76.                 n. Default is *LEFT=2.
  77.  
  78. *BASE=n./       Initializes counter for statement label numbers
  79. *NOBASE         to n for each program unit.  *NOBASE is
  80.                 equivalent to *BASE=0.  Default is *NOBASE.
  81.  
  82. *STAT=n.        Set the increment for statement numbers to n.
  83.                 Default is *STAT=10.
  84.  
  85. *REFE/          Make a cross-reference table between new labels
  86. *NOREFE         and old labels. *NOREFE suppresses the cross-
  87.                 reference table. Default is *NOREFE.
  88.  
  89.  
  90. II.2.  Indentation:
  91.  
  92. TIDY controls the starting column for FORTRAN statements with the
  93. *COLUMN option.  The default starting column is 7.  If desired,
  94. the *INDENT option may be used to automatically indent the
  95. contents of DO-loops and IF-blocks.  The commands which control
  96. statement positioning are:
  97.  
  98. Command                         Description
  99. *******                         ***********
  100. *COLU=n./       Start FORTRAN statements in column n. *NOCOLU
  101. *NOCOLU         leaves the first letter of the FORTRAN statement
  102.                 in place. Default is *COLU=7.
  103.  
  104. *INDEN=n.       Indents statements within DO-loops and IF-blocks.
  105. *NOINDEN        Maximum value for n is 10.  *NOINDEN turns this
  106.                 option off.  Default is *NOINDEN.
  107.  
  108.  
  109. II.3.  Serialization control:
  110.  
  111. Serialization consists of a 1-3 letter code in columns 73-75, a
  112. 4-digit serial number in columns 76-79, and a minus sign in
  113. column 80 of the END card.  The *SERIAL card is the master card
  114. which must be used to enable any of the serialization options.
  115.  
  116. The label field can either be copied from columns 73-75 of each
  117. FUNCTION, SUBROUTINE, or PROGRAM card (*LABEL option), or it can
  118. be generated automatically (*NOLABEL option).  The automatic
  119. label sequence is A, B, ... , Z, AA, AB, ... .  The user can choose
  120. where to start in this sequence with the *ROUT= card.
  121.  
  122. To prepare a deck with serial numbers in columns 76-79, but with
  123. no label, use the *LABE option and leave columns 73-75 of each
  124. FUNCTION, SUBROUTINE, or PROGRAM card blank.
  125.  
  126. Command                         Description
  127. *******                         ***********
  128. *SERI/          Begin or restore the punching of serialization in
  129. *NOSERI         columns 73-79. *NOSERI cancels all labelling in
  130.                 columns 73-80. Default is *NOSERI.
  131.  
  132.  
  133. *ROUT=xy        Reset the alphabetic label in columns 73 - 80 to
  134.                 the characters xy.
  135.  
  136. *LABE/          Use the labelling from columns 73-75 of the
  137. *NOLABE         current FUNCTION, SUBROUTINE or PROGRAM card for
  138.                 the sequencing in columns 73-80. *NOLABE turns
  139.                 this option off.  Default is *NOLABE.
  140.  
  141. *IDST=n.        Set the serial number increment. *IDST and *IDIN
  142. *IDIN=n.        are identical. This option works only when *SERI
  143.                 is in effect. Default is *IDST=1.
  144.  
  145. II.4.  String translation:
  146.  
  147. Since the Hollerith constant (nHf) is being phased out as a way
  148. to define strings, this version of TIDY can translate Hollerith
  149. constants to strings delimited by apostrophes.  Any apostrophes
  150. embedded in such strings will be doubled (e.g. 1H' becomes '''').
  151. The following options control this process:
  152.  
  153. *HTRAN=n./      Selects types of Hollerith constants to be changed
  154. *NOHTRAN        to apostrophe-delimited strings.  1 = Hollerith
  155.                 constants only, 2 = nLf and nRf (CDC variants) only,
  156.                 3 = all types.  *NOHTRAN turns this option off.
  157.                 Default is *HTRAN=1.
  158.  
  159. *DTRAN/         Causes strings delimited by a second type of
  160. *NODTRAN        delimiter (for example an asterisk) to be changed
  161.                 to strings delimited by the primary delimiter
  162.                 (normally an apostrophe).  Any occurrences of the
  163.                 primary delimiter within such strings will be
  164.                 properly duplicated (for example *'* becomes '''').
  165.                 *NODTRAN turns this option off.  Default is *DTRAN.
  166.  
  167. *DEL1=x         Defines the primary character used to delimit
  168.                 strings.  Default is apostrophe.
  169.  
  170. *DEL2=x  /      Defines an alternate character used to delimit
  171. *NODEL2         strings, which will be translated by the *DTRAN
  172.                 option.  *NODEL2 means no alternate delimiter
  173.                 is defined.  Default is *NODEL2.
  174.  
  175. II.5.  Miscellaneous commands:
  176.  
  177. Command                         Description
  178. *******                         ***********
  179. *ANSI/          Issue warning messages for statements which are
  180. *NOANSI         not part of ANSI Standard FORTRAN-77.  *NOANSI
  181.                 suppresses such messages.  Default is *ANSI.
  182.  
  183. *ARET=x         The character used to denote alternate return
  184.                 addresses in CALL statements (e.g. CALL F (*1,*2) )
  185.                 is set to x.  Default is * (ANSI standard).
  186.  
  187. *ARTRAN=x /     On output, the character used to denote alternate
  188. *NOARTRAN       return addresses in CALL statements (see *ARET
  189.                 above) will be changed to x.  *NOARTRAN prevents
  190.                 this translation.  Default is *NOARTRAN.
  191.  
  192. *CARD/          Produce a punch file (file containing TIDY'd
  193. *NOCARD         code). *NOCARD suppresses the creation of the
  194.                 punch file.  Default is *CARD.
  195.  
  196. *CCHR=x/        Use the character specified as x as the continu-
  197. *NOCCHR         ation character for all continuation lines of a
  198.                 statement.  Default (*NOCCHR) is to number
  199.                 continuation lines as (1, 2, ... 9, X).
  200.  
  201. *COLL/          Collect format statements at the end of the
  202. *NOCOLL         routine.  *NOCOLL leaves the format statements in
  203.                 place. Default is *NOCOLL.
  204.  
  205. *COMM/          Transmit comments to the output.  *NOCOMM deletes
  206. *NOCOMM         comments from output files. Default is *COMM.
  207.  
  208. *CONT/          Leave GOTO's and labeled CONTINUE's which are
  209. *NOCONT         not DO-loop terminators in the code. *NOCONT
  210.                 deletes such continue's and re-routes goto's,
  211.                 unless they are within an IF-block. Default is
  212.                 *NOCONT.
  213.  
  214. *EXEM/          Exempt non-executable statements from processing.
  215. *NOEXEM         *NOEXEM forces processing of all statements.
  216.                 Default is *NOEXEM.
  217.  
  218. *FEND/          *FEND forces an END statement to be written at the
  219. *NOFEND         end of each routine.  *NOFEND prevents forcing an
  220.                 END statement if one is not needed (such as in an
  221.                 INCLUDE file).  Default is *FEND.
  222.  
  223. *LAST           This card marks the end of the data to be
  224. *STOP           processed. *STOP works identically to *LAST. This
  225.                 card is not needed if processing to the end of
  226.                 file.
  227.  
  228. *LIST/          Write original source to the TIDY listing file.
  229. *NOLIST         *NOLIST suppresses inclusion of the original
  230.                 source. Default is *LIST.
  231.  
  232. *LIST = 2./     Write out TIDY'd code to listing file. *NOLIST=2
  233. *NOLIST = 2.    suppresses the TIDY'd listing. Default is LIST=2.
  234.  
  235. *NEWRO          Reset everything to starting values.
  236.  
  237. *SKIP           Skip processing to the end of the current
  238.                 routine.
  239.  
  240.