1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
|
<HTML>
<HEAD>
<TITLE>Invoking Ftnchek</TITLE>
</HEAD>
<BODY>
<A HREF="toc.html">Table of Contents</A><P>
<P>Previous: <A HREF="sect2.html">Description</A><HR><P>
<H2><A NAME="sect3" HREF="toc.html#toc3">Invoking Ftnchek </A></H2>
<B>ftnchek </B> is invoked through a
command of the form: <P>
<CENTER>$ ftnchek [-option -option ...] filename [filename ...]
</CENTER> <P>
The brackets indicate something which is optional. The brackets themselves
are not actually typed. Here options are command-line switches or settings,
which control the operation of the program and the amount of information
that will be printed out. If no option is specified, the default action
is to print error messages, warnings, and informational messages, but
not the program listing or symbol tables. <P>
Each option begins with the '-'
character. (On VAX/VMS or MS-DOS systems you may use either '/' or '-'.) The options
are described at greater length in the next section. <P>
<B>ftnchek </B> options fall
into two categories: switches, which are either true or false, and settings,
which have a numeric or string value. The name of a switch is prefixed
by 'no' or 'no-' to turn it off: e.g. <B>-nopure </B> would turn off the warnings about
impure functions. The 'no' prefix can also be used with numeric settings,
having the effect of turning off the corresponding warnings. Settings that
control lists of warnings have a special syntax discussed below. Only the
first 3 characters of an option name (not counting the '-') need be provided.
A colon may be used in place of an equals sign for numeric or string setting
assignments; however, we show only the equals sign form below. <P>
The switches
and settings which <B>ftnchek </B> currently recognizes are:
<DL>
<DT><B><A HREF="arguments.html">-arguments</A>=</B><I>list</I>
</DT>
<DD>Control warnings about subprogram type and argument mismatches. Default
= turn-on = all. </DD>
<DT><B><A HREF="array.html">-array</A>=</B><I>list</I> </DT>
<DD>Control warnings in checking array arguments
of subprograms. Default = turn-on = all. </DD>
<DT><B><A HREF="calltree.html">-calltree</A>=</B><I>list</I> </DT>
<DD>Produce subprogram
call hierarchy in one of 3 formats: text call-tree, who-calls-who and VCG.
</DD>
<DT><B><A HREF="check.html">-check</A></B> </DT>
<DD>Perform checking. Default = yes. </DD>
<DT><B><A HREF="columns.html">-columns</A>=</B><I>num</I> </DT>
<DD>Set maximum line length
to <I>num </I> columns. (Beyond this is ignored.) Turn-on = max = 132. Default
= 72. </DD>
<DT><B><A HREF="common.html">-common</A>=</B><I>list</I> </DT>
<DD>Set degree of strictness in checking COMMON blocks. </DD>
<DT><B><A HREF="crossref.html">-crossref</A></B>
</DT>
<DD>Print cross-reference list of subprogram calls and COMMON block use. Default
= no. </DD>
<DT><B><A HREF="declare.html">-declare</A></B> </DT>
<DD>Print a list of all identifiers whose datatype is not explicitly
declared. Default = no. </DD>
<DT><B><A HREF="division.html">-division</A></B> </DT>
<DD>Warn wherever division is done (except
division by a constant). Default = no. </DD>
<DT><B><A HREF="errors.html">-errors</A>= num</B> </DT>
<DD>Set the maximum number
of error messages per cascade. Default = 3. </DD>
<DT><B><A HREF="extern.html">-extern</A></B> </DT>
<DD>Warn if external subprograms
which are invoked are never defined. Default = yes. </DD>
<DT><B><A HREF="f77.html">-f77</A>=</B><I>list</I> </DT>
<DD>Control specific
warnings about supported extensions to the Fortran 77 Standard. Default
= none. </DD>
<DT><B><A HREF="f90.html">-f90</A>=</B><I>list</I> </DT>
<DD>Control specific warnings about supported extensions
to the Fortran 77 Standard that were not adopted as part of the Fortran
90 Standard. Default = none. </DD>
<DT><B><A HREF="f95.html">-f95</A>=</B><I>list</I> </DT>
<DD>Control specific warnings about
standard Fortran 77 features that were deleted from the Fortran 95 Standard.
Default = none. </DD>
<DT><B><A HREF="help.html">-help</A></B> </DT>
<DD>Print command summary. Default = no. </DD>
<DT><B><A HREF="include.html">-include</A>=</B><I>path</I>
</DT>
<DD>Define a directory to search for INCLUDE files. Cumulative. </DD>
<DT><B><A HREF="intrinsic.html">-intrinsic</A>=</B><I>list</I>
</DT>
<DD>Control treatment of nonstandard intrinsic functions. Default = all except
<B>vms </B> for Unix version, all except <B>unix </B> for VMS version, all except <B>unix
</B> and <B>vms </B> for other versions. </DD>
<DT><B><A HREF="library.html">-library</A></B> </DT>
<DD>Begin library mode: do not warn
about subprograms in file that are defined but never used. Default = no.
</DD>
<DT><B><A HREF="list.html">-list</A></B> </DT>
<DD>Print source listing of program. Default = no. </DD>
<DT><B><A HREF="makedcls.html">-makedcls</A>=</B><I>list</I> </DT>
<DD>Prepare
a file of declarations. The <I>list </I> specifies options for the format of
this file. Default = none. </DD>
<DT><B><A HREF="novice.html">-novice</A></B> </DT>
<DD>Give output suitable for novice users.
Default = yes. </DD>
<DT><B><A HREF="output.html">-output</A>=</B><I>filename</I> </DT>
<DD>Send output to the given file. Default
is to send output to the screen. (Default filename extension is <I>.lis </I>). </DD>
<DT><B><A HREF="pointersize.html">-pointersize</A>=</B><I>num</I>
</DT>
<DD>Set the size of ``Cray pointer'' variables to <I>num </I> bytes. Min = 1, max =
16. Default = turn-on = 4 </DD>
<DT><B><A HREF="portability.html">-portability</A>=</B><I>list</I> </DT>
<DD>Warn about non-portable usages.
Default = none. </DD>
<DT><B><A HREF="pretty.html">-pretty</A>=</B><I>list</I> </DT>
<DD>Give warnings for possibly misleading appearance
of source code. Default = all. </DD>
<DT><B><A HREF="project.html">-project</A></B> </DT>
<DD>Create project file (see explanation
below). Default = no. </DD>
<DT><B><A HREF="pure.html">-pure</A></B> </DT>
<DD>Assume functions are pure, i.e. have no side
effects. Default = yes. </DD>
<DT><B><A HREF="quiet.html">-quiet</A></B> </DT>
<DD>Produce less verbose output. Default = no.
</DD>
<DT><B><A HREF="reference.html">-reference</A></B> </DT>
<DD>Print table of subprograms referenced by each subprogram. Default
= no. </DD>
<DT><B><A HREF="resources.html">-resources</A></B> </DT>
<DD>Print amount of resources used in analyzing the program.
Default = no. </DD>
<DT><B><A HREF="sixchar.html">-sixchar</A></B> </DT>
<DD>List any variable names which clash at 6 characters
length. Default = no. </DD>
<DT><B><A HREF="sort.html">-sort</A></B> </DT>
<DD>Print list of subprograms sorted in prerequisite
order. Default = no. </DD>
<DT><B><A HREF="source.html">-source</A>=</B><I>list</I> </DT>
<DD>Select source formatting options: DEC
Fortran tab-formatted lines, VMS-style INCLUDE statement, UNIX-style backslash
escape sequences, and implicit typing of parameters. Default = none. </DD>
<DT><B><A HREF="symtab.html">-symtab</A></B>
</DT>
<DD>Print symbol table for each subprogram. Default = no. </DD>
<DT><B><A HREF="truncation.html">-truncation</A>=</B><I>list</I>
</DT>
<DD>Check for possible loss of accuracy by truncation. Default = all. </DD>
<DT><B><A HREF="usage.html">-usage</A>=</B><I>list</I>
</DT>
<DD>Control warnings about unused or uninitialized variables, common blocks,
etc. Default = all. </DD>
<DT><B><A HREF="vcg.html">-vcg</A></B> </DT>
<DD>Produce VCG format of call graph. </DD>
<DT><B><A HREF="version.html">-version</A></B> </DT>
<DD>Print
version number. Default = no. </DD>
<DT><B><A HREF="volatile.html">-volatile</A></B> </DT>
<DD>Assume COMMON blocks lose definition
between activations. Default = no. (Obsolete. Use <B><A HREF="common.html">-common</A>=volatile </B> instead.)
</DD>
<DT><B><A HREF="wordsize.html">-wordsize</A>=</B><I>num</I> </DT>
<DD>Set the default word size for numeric quantities to <I>num
</I> bytes. Default = turn-on = 4 bytes. </DD>
<DT><B><A HREF="wrap.html">-wrap</A>=</B><I>num</I> </DT>
<DD>Set output column at which
to wrap long error messages and warnings to the next line. If set to 0,
turn off wrapping. Default = turn-on = 79. </DD>
</DL>
<P>
When more than one option is
used, they should be separated by a blank space, except on systems such
as VMS where options begin with slash ( / ). No blank spaces may be placed
around the equals sign ( = ) in a setting. ftnchek "?" will produce a
command summary listing all options and settings. <P>
For settings that take
a list of keywords, namely <B><A HREF="f77.html">-f77</A> </B>, <B><A HREF="f90.html">-f90</A> </B>, <B><A HREF="f95.html">-f95</A> </B>, <B><A HREF="intrinsic.html">-intrinsic</A> </B>, <B><A HREF="portability.html">-portability</A> </B>,
<B><A HREF="pretty.html">-pretty</A> </B>, <B><A HREF="source.html">-source</A> </B>, <B><A HREF="truncation.html">-truncation</A> </B>, and <B><A HREF="usage.html">-usage</A> </B>, the list consists of keywords
separated by commas or colons. The list can be omitted, having the effect
of turning on all the options associated with that setting. Also, if the
list is omitted, the setting name can be prefixed with <B>no </B> or <B>no- </B> to turn
off all the options it controls. For example, <B><A HREF="f77.html">-f77</A> </B> turns on all warnings
about nonstandard constructions, while <B>-nof77 </B> turns them all off. Three
special keywords are:
<DL>
<DT><B>help</B> </DT>
<DD>Print out all the option keywords controlled
by the setting, with a brief explanation of their meanings. This keyword
cannot be given in a list with other keywords. </DD>
<DT><B>all</B> </DT>
<DD>Set all options. This
turns on all options controlled by the setting. </DD>
<DT><B>none</B> </DT>
<DD>Clear all options.
This turns off all options controlled by the setting. </DD>
</DL>
<P>
These three special
keywords must be given in full. For all other keywords, only as many letters
of the keyword as are necessary to identify it unambiguously need be given,
or a wildcard pattern may be used. Including a keyword in the list turns
the corresponding option on. For example, <B><A HREF="f77.html">-f77</A>=intrinsic </B> would turn on
only the warnings about use of nonstandard intrinsic functions. Prefixing
a keyword by <B>no- </B> turns its option off. For example, <B><A HREF="pretty.html">-pretty</A>=no-long-line </B>
turns off warnings about lines exceeding 72 columns in length while leaving
all other warnings about misleading appearance in effect. If a setting
has default <B>none </B>, you can turn on all options except one or two by using
<B>all </B> first. For example, <B><A HREF="f77.html">-f77</A>=all,no-include </B> enables warnings about all
nonstandard extensions except INCLUDE statements. If a setting has default
<B>all </B>, you can turn off all warnings except one or two by using <B>none </B> first.
For example, <B><A HREF="truncation.html">-truncation</A>=none,demotion </B> would turn off all precision related
warnings except about demotions. Wildcard patterns contain an asterisk
to stand for any string of characters. If a wildcard pattern is used,
all the warnings that match it are affected. If <B>no- </B> is prefixed to the
pattern, all the matching warnings are turned off, otherwise they are
all turned on. The minimum unambiguous length rule does not apply to wildcard
matching. For example, use <B><A HREF="usage.html">-usage</A>=no-*var* </B> to turn off all warnings relating
to variable usage (both local and common). (Unix users may need to quote
any options containing wildcards in order to prevent the shell from attempting
to expand them.) Wildcards are recognized only in lists of warning keywords,
not in the top-level options themselves. <P>
When <B>ftnchek </B> starts up, it looks
for environment variables and also for a preferences file. Any options
defined in the environment or in the preferences file are used as defaults
in place of the built-in defaults. They are over-ridden by any command line
options. See the section on changing the defaults for details about the
environment options and the preferences file. <P>
When giving a name of an
input file, the extension is optional. If no extension is given, <B>ftnchek
</B> will first look for a project file with extension <I>.prj </I>, and will use
that if it exists. If not, then <B>ftnchek </B> will look for a Fortran source
file with the extension <I>.for </I> for VMS systems, <I>.f </I> for UNIX systems. More
than one file name can be given to <B>ftnchek </B>, and it will process the modules
in all files as if they were in a single file. <P>
Wildcards are allowed in
the specification of filenames on the command line for the VMS and MS-DOS
versions, as also of course under UNIX and any other system that performs
wildcard expansion in the command processor. <P>
If no filename is given, <B>ftnchek
</B> will read input from the standard input.
<P><HR><P>Next: <A HREF="sect4.html">Options </A>
</BODY></HTML>
|