home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
fortran
/
library
/
tidy621
/
tidyhelp.cms
< prev
next >
Wrap
Text File
|
1990-05-21
|
10KB
|
240 lines
.cm Local Help
The NEWTIDY program renumbers and otherwise cleans up old and tired
FORTRAN source programs. NEWTIDY accepts ANSI FORTRAN with 19
continuation cards as well as some IBM and CDC dialect FORTRAN
statements. It is designed to work with ANSI FORTRAN-77, and will
also accept FORTRAN II and FORTRAN IV statements. Certain
FORTRAN II statements (such as READ INPUT TAPE) are automatically
translated to their FORTRAN IV equivalents. All lower case
alphabetic characters are translated to upper case except for
those in strings, Hollerith constants, and comment statements.
It is executed by:
NEWTIDY FILENAME FILETYPE FILEMODE
where
filename is the name of the file containing the FORTRAN
source
filetype is the type of the file containing the FORTRAN
source
filemode is the mode of the file containing the FORTRAN
source
The user can also have a file of TIDY control cards on the same disk as
the FORTRAN source program. This file, if used, is named:
PROFILE TIDY filemode
TIDY produces two files:
filename TIDYLIST filemode containing a diagnostic listing
from the TIDY run
filename TIDYFORT filemode containing the cleaned up FORTRAN
source from the TIDY run
TIDY uses two scratch files which are deleted at the end of the run:
$SCRTCH1 TIDYFILE filemode
$SCRTCH2 TIDYFILE filemode
II. TIDY Control Cards:
TIDY has certain commands which control the program's operation
and output file formats. These commands may occur in the user's
control file, or anywhere in the FORTRAN source file, and may be
used to negate a previous command. Default settings are listed
where meaningful.
TIDY commands must begin with an asterisk in column 1. The
remainder of the command consists of a four-letter keyword and
possibly an equal sign followed by a numeric or alphabetic
argument. Commands are negated by prefacing the keyword with the
letters NO.
The commands which control statement numbering, indentation, and
serial numbering are grouped separately, followed by
miscellaneous commands.
II.1. Statement number control:
TIDY numbers all statements in increasing order. The user can
specify the starting number for each routine, and the increment
between statement numbers. Additionally, the statement numbers
can be left- or right-justified as desired. The commands
controlling statement numbering are:
Command Description
******* ***********
*LEFT=n. Left adjust statement numbers to column n. *RIGHT
*RIGHT=n. right adjusts statement numbers to end in column
n. Default is *LEFT=2.
*BASE=n./ Initializes counter for statement label numbers
*NOBASE to n for each program unit. *NOBASE is
equivalent to *BASE=0. Default is *NOBASE.
*STAT=n. Set the increment for statement numbers to n.
Default is *STAT=10.
*REFE/ Make a cross-reference table between new labels
*NOREFE and old labels. *NOREFE suppresses the cross-
reference table. Default is *NOREFE.
II.2. Indentation:
TIDY controls the starting column for FORTRAN statements with the
*COLUMN option. The default starting column is 7. If desired,
the *INDENT option may be used to automatically indent the
contents of DO-loops and IF-blocks. The commands which control
statement positioning are:
Command Description
******* ***********
*COLU=n./ Start FORTRAN statements in column n. *NOCOLU
*NOCOLU leaves the first letter of the FORTRAN statement
in place. Default is *COLU=7.
*INDEN=n. Indents statements within DO-loops and IF-blocks.
*NOINDEN Maximum value for n is 10. *NOINDEN turns this
option off. Default is *NOINDEN.
II.3. Serialization control:
Serialization consists of a 1-3 letter code in columns 73-75, a
4-digit serial number in columns 76-79, and a minus sign in
column 80 of the END card. The *SERIAL card is the master card
which must be used to enable any of the serialization options.
The label field can either be copied from columns 73-75 of each
FUNCTION, SUBROUTINE, or PROGRAM card (*LABEL option), or it can
be generated automatically (*NOLABEL option). The automatic
label sequence is A, B, ... , Z, AA, AB, ... . The user can choose
where to start in this sequence with the *ROUT= card.
To prepare a deck with serial numbers in columns 76-79, but with
no label, use the *LABE option and leave columns 73-75 of each
FUNCTION, SUBROUTINE, or PROGRAM card blank.
Command Description
******* ***********
*SERI/ Begin or restore the punching of serialization in
*NOSERI columns 73-79. *NOSERI cancels all labelling in
columns 73-80. Default is *NOSERI.
*ROUT=xy Reset the alphabetic label in columns 73 - 80 to
the characters xy.
*LABE/ Use the labelling from columns 73-75 of the
*NOLABE current FUNCTION, SUBROUTINE or PROGRAM card for
the sequencing in columns 73-80. *NOLABE turns
this option off. Default is *NOLABE.
*IDST=n. Set the serial number increment. *IDST and *IDIN
*IDIN=n. are identical. This option works only when *SERI
is in effect. Default is *IDST=1.
II.4. String translation:
Since the Hollerith constant (nHf) is being phased out as a way
to define strings, this version of TIDY can translate Hollerith
constants to strings delimited by apostrophes. Any apostrophes
embedded in such strings will be doubled (e.g. 1H' becomes '''').
The following options control this process:
*HTRAN=n./ Selects types of Hollerith constants to be changed
*NOHTRAN to apostrophe-delimited strings. 1 = Hollerith
constants only, 2 = nLf and nRf (CDC variants) only,
3 = all types. *NOHTRAN turns this option off.
Default is *HTRAN=1.
*DTRAN/ Causes strings delimited by a second type of
*NODTRAN delimiter (for example an asterisk) to be changed
to strings delimited by the primary delimiter
(normally an apostrophe). Any occurrences of the
primary delimiter within such strings will be
properly duplicated (for example *'* becomes '''').
*NODTRAN turns this option off. Default is *DTRAN.
*DEL1=x Defines the primary character used to delimit
strings. Default is apostrophe.
*DEL2=x / Defines an alternate character used to delimit
*NODEL2 strings, which will be translated by the *DTRAN
option. *NODEL2 means no alternate delimiter
is defined. Default is *NODEL2.
II.5. Miscellaneous commands:
Command Description
******* ***********
*ANSI/ Issue warning messages for statements which are
*NOANSI not part of ANSI Standard FORTRAN-77. *NOANSI
suppresses such messages. Default is *ANSI.
*ARET=x The character used to denote alternate return
addresses in CALL statements (e.g. CALL F (*1,*2) )
is set to x. Default is * (ANSI standard).
*ARTRAN=x / On output, the character used to denote alternate
*NOARTRAN return addresses in CALL statements (see *ARET
above) will be changed to x. *NOARTRAN prevents
this translation. Default is *NOARTRAN.
*CARD/ Produce a punch file (file containing TIDY'd
*NOCARD code). *NOCARD suppresses the creation of the
punch file. Default is *CARD.
*CCHR=x/ Use the character specified as x as the continu-
*NOCCHR ation character for all continuation lines of a
statement. Default (*NOCCHR) is to number
continuation lines as (1, 2, ... 9, X).
*COLL/ Collect format statements at the end of the
*NOCOLL routine. *NOCOLL leaves the format statements in
place. Default is *NOCOLL.
*COMM/ Transmit comments to the output. *NOCOMM deletes
*NOCOMM comments from output files. Default is *COMM.
*CONT/ Leave GOTO's and labeled CONTINUE's which are
*NOCONT not DO-loop terminators in the code. *NOCONT
deletes such continue's and re-routes goto's,
unless they are within an IF-block. Default is
*NOCONT.
*EXEM/ Exempt non-executable statements from processing.
*NOEXEM *NOEXEM forces processing of all statements.
Default is *NOEXEM.
*FEND/ *FEND forces an END statement to be written at the
*NOFEND end of each routine. *NOFEND prevents forcing an
END statement if one is not needed (such as in an
INCLUDE file). Default is *FEND.
*LAST This card marks the end of the data to be
*STOP processed. *STOP works identically to *LAST. This
card is not needed if processing to the end of
file.
*LIST/ Write original source to the TIDY listing file.
*NOLIST *NOLIST suppresses inclusion of the original
source. Default is *LIST.
*LIST = 2./ Write out TIDY'd code to listing file. *NOLIST=2
*NOLIST = 2. suppresses the TIDY'd listing. Default is LIST=2.
*NEWRO Reset everything to starting values.
*SKIP Skip processing to the end of the current
routine.