home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / fortran / tidy64.zip / TIDYHELP.CMS < prev    next >
Text File  |  1993-10-13  |  12KB  |  293 lines

  1. .cm Local Help
  2.  
  3. The TIDY program renumbers and otherwise cleans up old and tired
  4. FORTRAN source programs.  TIDY accepts ANSI FORTRAN with up to 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 normally translated to upper case except for
  11. those in strings, Hollerith constants, and comment statements.
  12.  
  13. It is executed by:
  14.  
  15.           TIDY 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
  49. operation and output file formats. These commands may occur
  50. in the user control file, or anywhere in the FORTRAN source
  51. file, and may be used to negate a previous command. Default
  52. settings are listed 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
  56. and possibly an equal sign followed by a numeric or
  57. alphabetic argument.  Commands are negated by prefacing the
  58. keyword with the letters NO.
  59.  
  60. The commands which control statement numbering, indentation,
  61. and 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
  67. can specify the starting number for each routine, and the
  68. increment between statement numbers.  Additionally, the
  69. statement numbers can be left- or right-justified as
  70. desired.  The commands controlling statement numbering are:
  71.  
  72. Command        Description
  73. *******        ***********
  74.  
  75. *LEFT=n. /     Left adjust statement numbers to column n.
  76. *RIGHT=n.      *RIGHT right adjusts statement numbers to end
  77.                in column n. Default is *LEFT=2.
  78.  
  79. *BASE=n. /     Initializes counter for statement label
  80. *NOBASE        numbers to n for each program unit.  *NOBASE
  81.                is equivalent to *BASE=0.  Default is
  82.                *NOBASE.
  83.  
  84. *STAT=n.       Set the increment for statement numbers to n.
  85.                Default is *STAT=10.
  86.  
  87. *REFE /        Make a cross-reference table between new
  88. *NOREFE        labels and old labels. *NOREFE suppresses the
  89.                cross-reference table. Default is *NOREFE.
  90.  
  91. II.2.  Indentation:
  92.  
  93. TIDY controls the starting column for FORTRAN statements
  94. with the *COLUMN option.  The default starting column is 7.
  95. If desired, the *INDENT option may be used to automatically
  96. indent the contents of DO-loops and IF-blocks.  The commands
  97. which control statement positioning are:
  98.  
  99.  
  100. Command        Description
  101. *******        ***********
  102.  
  103. *COLU=n./      Start FORTRAN statements in column n. *NOCOLU
  104. *NOCOLU        leaves the first letter of the FORTRAN
  105.                statement in place. Default is *COLU=7.
  106.  
  107. *INDEN=n.      Indents statements within DO-loops and IF-
  108. *NOINDEN       blocks. Maximum value for n is 10.  *NOINDEN
  109.                turns this option off.  Default is *NOINDEN.
  110.  
  111. *FSPL /        This option controls the treatment of strings
  112. *NOFSPL        in FORMAT statements when indentation is used
  113.                and the FORMAT statements are not collected
  114.                at the end of each routine.  If *FSPL is
  115.                selected, a string which spans two cards will
  116.                be broken into two strings, and the
  117.                continuation card will be indented under the
  118.                FORMAT statement.  If *NOFSPL is selected,
  119.                the string will not be split into two parts,
  120.                and the continuation card's text will begin
  121.                in column 7. Since splitting strings in a
  122.                FORMAT statement may adversely affect
  123.                readability, the default is *NOFSPL.
  124.  
  125. II.3.  Serialization control:
  126.  
  127. Serialization consists of a 1-3 letter code in columns 73-
  128. 75, a 4-digit serial number in columns 76-79, and a minus
  129. sign in column 80 of the END card.  The *SERIAL card is the
  130. master card which must be used to enable any of the
  131. serialization options.
  132.  
  133. The label field can either be copied from columns 73-75 of
  134. each FUNCTION, SUBROUTINE, or PROGRAM card (*LABEL option),
  135. or it can be generated automatically (*NOLABEL option).  The
  136. automatic label sequence is A, B, ... , Z, AA, AB, ... .
  137. The user can choose where to start in this sequence with the
  138. *ROUT= card.
  139.  
  140. To prepare a deck with serial numbers in columns 76-79, but
  141. with no label, use the *LABE option and leave columns 73-75
  142. of each FUNCTION, SUBROUTINE, or PROGRAM card blank.
  143.  
  144. Command        Description
  145. *******        ***********
  146.  
  147. *SERI /        Begin or restore the punching of
  148. *NOSERI        serialization in columns 73-79. *NOSERI
  149.                cancels all labelling in columns 73-80.
  150.                Default is *NOSERI.
  151.  
  152. *ROUT=xy       Reset the alphabetic label in columns 73 - 80
  153.                to the characters xy.
  154.  
  155. *LABE /        Use the labelling from columns 73-75 of the
  156. *NOLABE        current FUNCTION, SUBROUTINE or PROGRAM card
  157.                for the sequencing in columns 73-80. *NOLABE
  158.                turns this option off.  Default is *NOLABE.
  159.  
  160. *IDST=n. /     Set the serial number increment. *IDST and
  161. *IDIN=n.       *IDIN are identical. This option works only
  162.                when *SERI is in effect. Default is *IDST=1.
  163.  
  164. II.4.  String translation:
  165.  
  166. Since the Hollerith constant (nHf) is being phased out as a
  167. way to define strings, this version of TIDY can translate
  168. Hollerith constants to strings delimited by apostrophes.
  169. Any apostrophes embedded in such strings will be doubled
  170. (e.g. 1H' becomes '''').
  171.  
  172. The following options control this process:
  173.  
  174. Command        Description
  175. *******        ***********
  176.  
  177. *HTRAN=n./     Selects types of Hollerith constants to be
  178. *NOHTRAN       changed to apostrophe-delimited strings.  1 =
  179.                Hollerith constants only, 2 = nLf and nRf
  180.                (CDC variants) only, 3 = all types.  *NOHTRAN
  181.                turns this option off. Default is *HTRAN=1.
  182.  
  183. *HLOG /        As an aid to identifying variables which
  184. *NOHLOG        should be typed as CHARACTER in Fortran-77,
  185.                executable statements in which Hollerith
  186.                constants have been converted to delimited
  187.                strings can be identified in the listing
  188.                file. Default is *NOHLOG.
  189.  
  190. *DEL1=x        Defines the primary character used to delimit
  191.                strings.  Default is apostrophe.
  192.  
  193. *DEL2=x /      Defines an alternate character used to
  194. *NODEL2        delimit strings. These strings may be
  195.                translated by the *DTRAN option.  *NODEL2
  196.                means no alternate string delimiter is
  197.                defined.  Default is *NODEL2.
  198.  
  199. *DTRAN /       Causes strings delimited by a second type of
  200. *NODTRAN       delimiter (for example an asterisk) to be
  201.                changed to strings delimited by the primary
  202.                delimiter (normally an apostrophe).  Any
  203.                occurrences of the primary delimiter within
  204.                such strings will be properly duplicated (for
  205.                example *'* becomes ''''). *NODTRAN turns
  206.                this option off.  Default is *NODTRAN.
  207.  
  208. II.5.  Miscellaneous commands:
  209.  
  210.  
  211. Command        Description
  212. *******        ***********
  213.  
  214. *ANSI /        Issue warning messages for statements which
  215. *NOANSI        are not part of ANSI Standard FORTRAN-77.
  216.                *NOANSI suppresses such messages.  Default is
  217.                *ANSI.
  218.  
  219. *ARET=x        The character used to denote alternate return
  220.                addresses in CALL statements (e.g. CALL F
  221.                (*1,*2) ) is set to x.  Default is * (ANSI
  222.                standard).
  223.  
  224. *ARTRAN=x /    On output, the character used to denote
  225. *NOARTRAN      alternate return addresses in CALL statements
  226.                (see *ARET above) will be changed to x.
  227.                *NOARTRAN prevents this translation.  Default
  228.                is *NOARTRAN.
  229.  
  230. *CARD /        Produce a punch file (file containing TIDY'd
  231. *NOCARD        code). *NOCARD suppresses the creation of the
  232.                punch file.  Default is *CARD.
  233.  
  234. *UCASE /       Translate all characters which are not in
  235. *LCASE /       strings or comment statements to upper case
  236. *NOCASE        (*UCASE), or to lower case(*LCASE).  *NOCASE
  237.                suppresses case translation, thus allowing
  238.                mixed-case statements (such as Total=0).
  239.                Default is *UCASE.
  240.  
  241. *CCHR=x /      Use the character specified as x as the
  242. *NOCCHR        continuation character for all continuation
  243.                lines of a statement.  Default (*NOCCHR) is
  244.                to number continuation lines as (1, 2, ... 9,
  245.                X).
  246.  
  247. *COLL /        Collect format statements at the end of the
  248. *NOCOLL        routine.  *NOCOLL leaves the format
  249.                statements in place. Default is *NOCOLL.
  250.  
  251. *COMM /        Transmit comments to the output.  *NOCOMM
  252. *NOCOMM        deletes comments from output files. Default
  253.                is *COMM.
  254.  
  255. *BLAN /        Retain blank lines in output files.  *NOBLAN
  256. *NOBLAN        deletes blank lines.  Default is *BLAN.
  257.  
  258. *CONT /        Leave GOTO's and labeled CONTINUE's which are
  259. *NOCONT        not DO-loop terminators in the code. *NOCONT
  260.                deletes such CONTINUE's and re-routes GOTO's,
  261.                unless they are within an IF-block. Default
  262.                is *NOCONT.
  263.  
  264. *ENDO /        Leave DO-END DO loops in the code.  *NOENDO
  265. *NOENDO        causes these loops to be converted to
  266.                conventional numbered DO-loops which
  267.                terminate with CONTINUE statements. Default
  268.                is *NOENDO.
  269.  
  270. *EXEM /        Exempt non-executable statements from
  271. *NOEXEM        processing. *NOEXEM forces processing of all
  272.                statements. Default is *NOEXEM.
  273.  
  274. *FEND /        *FEND forces an END statement to be written
  275. *NOFEND        at the end of each routine.  *NOFEND prevents
  276.                forcing an END statement if one is not needed
  277.                (such as in an INCLUDE file).  Default is
  278.                *FEND.
  279.  
  280. *LIST /        Write original source to the TIDY listing
  281. *NOLIST        file. *NOLIST suppresses inclusion of the
  282.                original source. Default is *LIST.
  283.  
  284. *LIST = 2. /   Write out TIDY'd code to listing file.
  285. *NOLIST = 2.   *NOLIST=2 suppresses the TIDY'd listing.
  286.                Default is LIST=2.
  287.  
  288. *NEWRO         Reset everything to starting values.
  289.  
  290. *SKIP          Skip processing to the end of the current
  291.                routine.
  292.  
  293.