home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / fchk294b.zip / ftnchek-2.9.4 / ftnchek.doc < prev    next >
Text File  |  1996-10-02  |  175KB  |  4,357 lines

  1.  
  2.  
  3.  
  4. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  5.  
  6.  
  7. NAME
  8.         ftnchek - Fortran 77 program checker
  9.  
  10.  
  11. SYNOPSIS
  12.        ftnchek [ -arguments[=num] ] [ -array[=num] ]
  13.             [ -calltree[=num] ] [ -[no]check ] [ -columns[=num] ]
  14.             [ -common[=num] ] [ -[no]crossref ] [ -[no]declare ]
  15.             [ -[no]division ] [ -[no]extern ] [ -[no]f77[=str] ]
  16.             [ -[no]help ] [ -include=str ] [ -intrinsic[=num] ]
  17.             [ -[no]library ] [ -[no]list ] [ -makedcls[=num] ]
  18.             [ -[no]novice ] [ -output=str ]
  19.             [ -[no]portability[=str] ] [ -[no]pretty[=str] ]
  20.             [ -[no]project ] [ -[no]pure ] [ -[no]quiet ]
  21.             [ -[no]reference ] [ -[no]resources ]
  22.             [ -[no]sixchar ] [ -[no]sort ] [ -source[=num] ]
  23.             [ -[no]symtab ] [ -[no]truncation[=str] ]
  24.             [ -usage[=num] ] [ -[no]vcg ] [ -[no]version ]
  25.             [ -[no]volatile ] [ -wordsize[=num] ] [ -wrap[=num] ]
  26.             [ files ...  ]
  27.  
  28.  
  29. DESCRIPTION
  30.  
  31.  
  32.        ftnchek  (short for Fortran checker) is designed to detect
  33.        certain errors in a Fortran program that a  compiler  usu-
  34.        ally  does  not.   ftnchek  is  not  primarily intended to
  35.        detect syntax errors.  Its purpose is to assist  the  user
  36.        in  finding semantic errors.  Semantic errors are legal in
  37.        the Fortran language but are wasteful or may cause  incor-
  38.        rect  operation.   For  example, variables which are never
  39.        used may indicate some omission in the program; uninitial-
  40.        ized  variables  contain garbage which may cause incorrect
  41.        results to be calculated;  and  variables  which  are  not
  42.        declared  may  not  have  the  intended  type.  ftnchek is
  43.        intended to assist users in the debugging of their Fortran
  44.        program.   It  is not intended to catch all syntax errors.
  45.        This is the function of  the  compiler.   Prior  to  using
  46.        ftnchek,  the user should verify that the program compiles
  47.        correctly.
  48.  
  49.  
  50.  
  51.        This document first  summarizes  how  to  invoke  ftnchek.
  52.        That  section  should  be  read  before  beginning  to use
  53.        ftnchek.  Later sections  describe  ftnchek's  options  in
  54.        more  detail,  give an example of its use, and explain how
  55.        to interpret the output.  The final sections  mention  the
  56.        limitations and known bugs in ftnchek.
  57.  
  58. INVOKING FTNCHEK
  59.         ftnchek is invoked through a command of the form:
  60.  
  61.  
  62.  
  63.  
  64.                             4 Apr 1996                          1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  71.  
  72.  
  73.         $ ftnchek [-option -option ...] filename [filename ...]
  74.  
  75.        The  brackets  indicate  something which is optional.  The
  76.        brackets themselves are not actually typed.  Here  options
  77.        are  command-line  switches or settings, which control the
  78.        operation of the program and  the  amount  of  information
  79.        that  will be printed out.  If no option is specified, the
  80.        default action is to print error messages,  warnings,  and
  81.        informational  messages,  but  not  the program listing or
  82.        symbol tables.
  83.  
  84.  
  85.        Each option begins with the '-' character.  (On VAX/VMS or
  86.        MS-DOS  systems  you  may  use  either  '/'  or '-'.)  The
  87.        options are described at greater length in the  next  sec-
  88.        tion.
  89.  
  90.        ftnchek  options fall into two categories: switches, which
  91.        are either true or  false,  and  settings,  which  have  a
  92.        numeric or string value.  The name of a switch is prefixed
  93.        by 'no' to turn it off: e.g. -nopure would  turn  off  the
  94.        warnings  about impure functions. The 'no' prefix can also
  95.        be used with numeric settings, having the effect of  turn-
  96.        ing off the corresponding warnings.  Settings that control
  97.        lists of warnings have a special syntax  discussed  below.
  98.        Only  the first 3 characters of an option name (not count-
  99.        ing the '-') need be provided.  A colon  may  be  used  in
  100.        place  of  an  equals  sign  for numeric or string setting
  101.        assignments; however, we show only the  equals  sign  form
  102.        below.
  103.  
  104.  
  105.        The  switches  and settings which ftnchek currently recog-
  106.        nizes are:
  107.  
  108.        -arguments=num
  109.               Set level  of  strictness  in  checking  subprogram
  110.               arguments.  Min is 0 (no checking).  Max is 3 (most
  111.               checking).  Default = turn-on = 3.
  112.  
  113.        -array=num
  114.               Set level of strictness in checking array arguments
  115.               of subprograms.  Min is 0 (least strict).  Max is 3
  116.               (most strict).  Default = turn-on = 3.
  117.  
  118.        -calltree=num
  119.               Produce subprogram call hierarchy in one of 3  for-
  120.               mats.   Default  =  0, no tree.  Turn-on = 1, call-
  121.               tree format.  Other values are 2, who-calls-who and
  122.               3, VCG.
  123.  
  124.        -check Perform checking.  Default = yes.
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                             4 Apr 1996                          2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  137.  
  138.  
  139.        -columns=num
  140.               Set  maximum  line  length  to num columns. (Beyond
  141.               this is ignored.)  Turn-on = max = 132.  Default  =
  142.               72.
  143.  
  144.        -common=num
  145.               Set  level of strictness in checking COMMON blocks.
  146.               Min is 0 (no checking).  Max is 3 (must be  identi-
  147.               cal).  Default = turn-on = 3.
  148.  
  149.        -crossref
  150.               Print  cross-reference list of subprogram calls and
  151.               COMMON block use.  Default = no.
  152.  
  153.        -declare
  154.               Print a list of all identifiers whose  datatype  is
  155.               not explicitly declared.  Default = no.
  156.  
  157.        -division
  158.               Warn  wherever division is done (except division by
  159.               a constant).  Default = no.
  160.  
  161.        -extern
  162.               Warn if external subprograms which are invoked  are
  163.               never defined.  Default = yes.
  164.  
  165.        -f77=list
  166.               Control  specific  warnings  about supported exten-
  167.               sions to the Fortran 77 Standard.  Default  = none.
  168.  
  169.        -help  Print command summary.  Default = no.
  170.  
  171.        -include=path
  172.               Define  a  directory  to  search for INCLUDE files.
  173.               Cumulative.
  174.  
  175.        -intrinsic=num
  176.               Control treatment of  nonstandard  intrinsic  func-
  177.               tions.   Three digits.  Max = 223.  Default = turn-
  178.               on = 222 for Unix version, 223 for VMS version, 221
  179.               for others.
  180.  
  181.        -library
  182.               Begin  library  mode: do not warn about subprograms
  183.               in file that are defined but never used.  Default =
  184.               no.
  185.  
  186.        -list  Print source listing of program.  Default = no.
  187.  
  188.        -makedcls=num
  189.               Prepare  a file of declarations.  Min is 0 (no dec-
  190.               laration file).  Max is 1023.  Default = 0, turn-on
  191.               = 1.
  192.  
  193.  
  194.  
  195.  
  196.                             4 Apr 1996                          3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  203.  
  204.  
  205.        -novice
  206.               Give  output  suitable for novice users.  Default =
  207.               yes.
  208.  
  209.        -output=filename
  210.               Send output to the given file.  Default is to  send
  211.               output  to  the screen. (Default filename extension
  212.               is .lis).
  213.  
  214.        -portability=list
  215.               Warn about non-portable usages.  Default = none.
  216.  
  217.        -pretty=list
  218.               Give warnings for possibly misleading appearance of
  219.               source code.    Default = all.
  220.  
  221.        -project
  222.               Create   project   file  (see  explanation  below).
  223.               Default = no.
  224.  
  225.        -pure  Assume  functions  are  pure,  i.e.  have  no  side
  226.               effects.  Default = yes.
  227.  
  228.        -quiet Produce less verbose output.  Default = no.
  229.  
  230.        -reference
  231.               Print  table of subprograms referenced by each sub-
  232.               program.  Default = no.
  233.  
  234.        -resources
  235.               Print amount of resources  used  in  analyzing  the
  236.               program.  Default = no.
  237.  
  238.        -sixchar
  239.               List any variable names which clash at 6 characters
  240.               length.  Default = no.
  241.  
  242.        -sort  Print list of subprograms  sorted  in  prerequisite
  243.               order.  Default = no.
  244.  
  245.        -source=num
  246.               Select source formatting options.  Sum of 1 for DEC
  247.               Fortran  tab-formatted  lines,  2   for   VMS-style
  248.               INCLUDE  statement,  and 4 for UNIX-style backslash
  249.               escape sequences.  Default = 0.  Turn-on = max = 7.
  250.  
  251.        -symtab
  252.               Print  symbol table for each subprogram.  Default =
  253.               no.
  254.  
  255.        -truncation=list
  256.               Check for possible loss of accuracy by  truncation.
  257.               Default = all.
  258.  
  259.  
  260.  
  261.  
  262.                             4 Apr 1996                          4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  269.  
  270.  
  271.        -usage=num
  272.               Control   warnings  about  unused  variables,  etc.
  273.               Three digits: 1st digit = subprograms, 2nd digit  =
  274.               common,  3rd  digit  =  local  variables.  For each
  275.               digit: min is 0  (no  checking).  Max  is  3  (most
  276.               checking).  Default = turn-on = 333.
  277.  
  278.        -vcg   Produce VCG format of call graph.
  279.  
  280.        -version
  281.               Print version number.  Default = no.
  282.  
  283.        -volatile
  284.               Assume  COMMON blocks lose definition between acti-
  285.               vations.  Default = no.
  286.  
  287.        -wordsize=num
  288.               Set the default word size for numeric quantities to
  289.               num bytes.  Default = turn-on = 4 bytes.
  290.  
  291.        -wrap=num
  292.               Set  output column at which to wrap long error mes-
  293.               sages and warnings to the next line.  If set to  0,
  294.               turn off wrapping.  Default = turn-on = 79.
  295.  
  296.  
  297.        When  more  than  one option is used, they should be sepa-
  298.        rated by a blank space, except  on  systems  such  as  VMS
  299.        where options begin with slash ( / ).  No blank spaces may
  300.        be placed around the equals sign  (  =  )  in  a  setting.
  301.        ftnchek  "?"   will  produce a command summary listing all
  302.        options and settings.
  303.  
  304.        For settings that take a list of  warnings,  namely  -f77,
  305.        -pretty,  -portability, and -truncation, the list consists
  306.        of keywords separated by commas or colons.  The  list  can
  307.        be omitted, having the effect of turning on all the corre-
  308.        sponding warnings.  Also, if the list is omitted, the set-
  309.        ting  name  can  be  prefixed  with no to turn off all the
  310.        warnings it controls.  For  example,  -f77  turns  on  all
  311.        warnings  about  nonstandard  constructions,  while -nof77
  312.        turns them all off.    Three special keywords are:
  313.  
  314.        help   Print out all  the  warning  option  keywords  con-
  315.               trolled by the setting, with a brief explanation of
  316.               their meanings.  This keyword cannot be given in  a
  317.               list with other keywords.
  318.  
  319.        all    Set  all  warnings. This turns on all warnings con-
  320.               trolled by the setting.
  321.  
  322.        none   Clear all warnings.  This turns  off  all  warnings
  323.               controlled by the setting.
  324.  
  325.  
  326.  
  327.  
  328.                             4 Apr 1996                          5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  335.  
  336.  
  337.        These  special  keywords  must  be given in full.  For all
  338.        other warning keywords, only as many letters of  the  key-
  339.        word as are necessary to identify it unambiguously need be
  340.        given.  Including a keyword in the list turns its warnings
  341.        on.   For  example,  -f77=intrinsic would turn on only the
  342.        warnings about use  of  nonstandard  intrinsic  functions.
  343.        Prefixing  a  keyword  by no- turns its warnings off.  For
  344.        example, -pretty=no-long-line  turns  off  warnings  about
  345.        lines  exceeding  72  columns  in length while leaving all
  346.        other warnings about misleading appearance in effect.   If
  347.        a  setting  has default none, you can turn on all warnings
  348.        except one or  two  by  using  all  first.   For  example,
  349.        -f77=all,no-include enables warnings about all nonstandard
  350.        extensions except INCLUDE statements.  If  a  setting  has
  351.        default  all,  you can turn off all warnings except one or
  352.        two  by  using  none   first.    For   example,   -trunca-
  353.        tion=none,demotion  would  turn  off all precision related
  354.        warnings except about demotions.
  355.  
  356.        When ftnchek starts up, it looks for environment variables
  357.        and  also  for a preferences file.  Any options defined in
  358.        the environment or in the preferences  file  are  used  as
  359.        defaults  in  place  of  the  built-in defaults.  They are
  360.        over-ridden by any command line options.  See the  section
  361.        on changing the defaults for details about the environment
  362.        options and the preferences file.
  363.  
  364.  
  365.        When giving a name of an  input  file,  the  extension  is
  366.        optional.   If  no  extension is given, ftnchek will first
  367.        look for a project file with extension .prj, and will  use
  368.        that  if  it exists.  If not, then ftnchek will look for a
  369.        Fortran source file with the extension .for for  VMS  sys-
  370.        tems, .f for UNIX systems.  More than one file name can be
  371.        given to ftnchek, and it will process the modules  in  all
  372.        files as if they were in a single file.
  373.  
  374.  
  375.        Wildcards are allowed in the specification of filenames on
  376.        the command line for the VMS and MS-DOS versions, as  also
  377.        of  course  under  UNIX and any other system that performs
  378.        wildcard expansion in the command processor.
  379.  
  380.        If no filename is given, ftnchek will read input from  the
  381.        standard input.
  382.  
  383.  
  384.  
  385. OPTIONS
  386.        This  section  provides  a  more  detailed  discussion  of
  387.        ftnchek command-line options.  Options and  filenames  may
  388.        be interspersed on a command line.  Most options are posi-
  389.        tional: each option remains in effect from the point it is
  390.        encountered  until  it  is  overridden  by a later change.
  391.  
  392.  
  393.  
  394.                             4 Apr 1996                          6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  401.  
  402.  
  403.        Thus for example, the listing may be suppressed  for  some
  404.        files  and  not for others.  Exceptions are: the -wordsize
  405.        setting, which cannot be changed once processing of  input
  406.        files  has  started;  the  -arguments,  -array, -calltree,
  407.        -common, -crossref, -extern, -reference, -resource, -sort,
  408.        -vcg, and -volatile options, where the action depends only
  409.        on the value of the option after the processing  of  input
  410.        files  is  finished;  and  the  -include setting, which is
  411.        cumulative.
  412.  
  413.        The option names in the following list are in alphabetical
  414.        order.
  415.  
  416.  
  417.  
  418.        -arguments=num
  419.                 Controls warnings about mismatches between actual
  420.               and dummy subprogram arguments.  (An  actual  argu-
  421.               ment is an argument passed to the subprogram by the
  422.               caller; a dummy argument is an argument received by
  423.               the subprogram.)
  424.  
  425.               The meanings of the setting values are as follows:
  426.  
  427.               0:  turn off all such warnings.
  428.  
  429.               1:  warn  only about different number of arguments.
  430.  
  431.               2:  warn only about mismatch of data type of  argu-
  432.                   ments and of function itself.
  433.  
  434.               3:  all warnings.
  435.  
  436.               Default = turn-on = 3.
  437.  
  438.               This setting does not apply to checking invocations
  439.               of intrinsic functions or statement functions.
  440.  
  441.               See also: -array, -library, -usage.
  442.  
  443.  
  444.  
  445.        -array=num
  446.                Controls the  degree  of  strictness  in  checking
  447.               agreement between actual and dummy subprogram argu-
  448.               ments that are arrays.  The warnings controlled  by
  449.               this  setting  are  for  constructions  that  might
  450.               legitimately be used by a knowledgeable programmer,
  451.               but that often indicate programming errors.
  452.  
  453.               The meanings of the setting values are as follows:
  454.  
  455.               0:  only  warn  about  cases that are seldom inten-
  456.                   tional (see note below).
  457.  
  458.  
  459.  
  460.                             4 Apr 1996                          7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  467.  
  468.  
  469.               1:  warn if the arguments differ in their number of
  470.                   dimensions,  or  if  the  actual argument is an
  471.                   array element while the  dummy  argument  is  a
  472.                   whole array.
  473.  
  474.               2:  warn  if  both  arguments  are arrays, but they
  475.                   differ in number of elements.
  476.  
  477.               3:  give both types of warnings.
  478.  
  479.               Default = turn-on = 3.
  480.  
  481.               Note: A warning is always given regardless of  this
  482.               setting  if  the  actual argument is an array while
  483.               the dummy argument is a scalar variable, or if  the
  484.               actual  argument is a scalar variable or expression
  485.               while the dummy argument is an array.   No  warning
  486.               is  ever  given  if the actual argument is an array
  487.               element while the dummy argument is a scalar  vari-
  488.               able.    Variable-dimensioned   arrays  and  arrays
  489.               dimensioned with 1 or asterisk match any number  of
  490.               array  elements.   There  is  no  check  of whether
  491.               multi-dimensional arrays agree in the size of  each
  492.               dimension separately.
  493.  
  494.               See also: -arguments, -library, -usage.
  495.  
  496.  
  497.  
  498.        -calltree=num
  499.                 Causes ftnchek to print out the call structure of
  500.               the complete program.  The value of num is the  sum
  501.               of numbers selected from the following list:
  502.  
  503.               0:  do not produce any call graph.
  504.  
  505.               1:  produce the call graph in tree format.
  506.  
  507.               2:  produce  the call graph in who-calls-who format
  508.                   (same as -reference switch).
  509.  
  510.               3:  produce the call graph in VCG format  (same  as
  511.                   -vcg switch).
  512.  
  513.               4:  do not prune repeated subtrees (applicable only
  514.                   for format 1).
  515.  
  516.               8:  do not sort children into alphabetical order.
  517.  
  518.               Only one of the formats 1, 2, or 3 may be  included
  519.               in  the  sum.  If no format is specified but one of
  520.               the other options is given so that  the  number  is
  521.               nonzero, call-tree format will be used.
  522.  
  523.  
  524.  
  525.  
  526.                             4 Apr 1996                          8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  533.  
  534.  
  535.               Default  =  turn-on = 1.  See the discussion of the
  536.               -reference and -vcg flags for details  about  these
  537.               formats.
  538.  
  539.               For  tree  format, The tree is printed out starting
  540.               from the main program, which is listed on the first
  541.               line  at  the  left  margin.  Then on the following
  542.               lines, each routine called by the main  program  is
  543.               listed, indented a few spaces, followed by the sub-
  544.               tree starting at that routine.
  545.  
  546.               In the default mode, if a routine is called by more
  547.               than one other routine, its call subtree is printed
  548.               only the first time it is encountered  Later  calls
  549.               give  only  the  routine name and the notice ``(see
  550.               above)''.  To have the  subtree  printed  for  each
  551.               occurrence  of the routine, include 4 (don't-prune)
  552.               in num.
  553.  
  554.               Note that the call tree will be incomplete  if  any
  555.               of  the  input  files  are project files containing
  556.               more than one module that were created in  -library
  557.               mode.  See the discussion of project files below.
  558.  
  559.               Technical points: Each list of routines called by a
  560.               given routine is printed in alphabetical order.  If
  561.               multiple  main programs are found, the call tree of
  562.               each is printed separately.  If no main program  is
  563.               found,  a report to that effect is printed out, and
  564.               the call trees of any  top-level  non-library  rou-
  565.               tines  are  printed.   This  flag only controls the
  566.               printing of the call tree: ftnchek  constructs  the
  567.               call  tree in any case because it is used to deter-
  568.               mine which library modules will  be  cross-checked.
  569.               See the discussion of the -library flag.
  570.  
  571.               See  also:  -crossref, -library, -reference, -sort,
  572.               -symtab, -vcg.
  573.  
  574.  
  575.  
  576.        -check  This switch is provided so that errors and warning
  577.               messages can be turned off when ftnchek is used for
  578.               purposes other than finding bugs,  such  as  making
  579.               declarations  or  printing  the  call  tree.  It is
  580.               positional,  so  after  turning  all  checks   off,
  581.               selected  checks can be turned back on.  The effect
  582.               of -nocheck is to put all  switches,  numeric  set-
  583.               tings,  and  settings controlling lists of warnings
  584.               to their turn-off values, as if they had  all  been
  585.               specified with the -no prefix.  The only exceptions
  586.               are -quiet, -source, -wrap and -wordsize, which are
  587.               unaffected by this switch.  Default = yes.
  588.  
  589.  
  590.  
  591.  
  592.                             4 Apr 1996                          9
  593.  
  594.  
  595.  
  596.  
  597.  
  598. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  599.  
  600.  
  601.               Parse  errors (syntax errors due to unrecognized or
  602.               malformed statements) are not  suppressed  by  this
  603.               switch,  since  the  results  may  be  incorrect if
  604.               ftnchek has not parsed the program correctly.  Note
  605.               that  -check  as an option has no effect: this flag
  606.               can only turn checking off, not  turn  it  back  on
  607.               again.
  608.  
  609.  
  610.  
  611.        -columns=num
  612.                 Set  maximum  statement  length  to  num columns.
  613.               (Beyond this is ignored.)  This setting is provided
  614.               to allow checking of programs which may violate the
  615.               Fortran standard limit of 72 columns for the length
  616.               of  a  statement.   According  to the standard, all
  617.               characters past column 72  are  ignored.   If  this
  618.               setting  is  used when the -f77=long-line option is
  619.               in effect, a warning will be given for any lines in
  620.               which  characters  past  column  72  are processed.
  621.               Turn-on = max = 132.  Default = 72.
  622.  
  623.               This setting does not suppress warnings  about  the
  624.               presence  of  characters beyond column 72.  To pro-
  625.               cess code with meaningful program text beyond  col-
  626.               umn  72,  use  this  setting  and  be sure the -f77
  627.               long-line option is  off.   To  process  code  with
  628.               sequence numbers in columns 73 to 80, leave the the
  629.               columns setting at the default value  and  use  the
  630.               -pretty=no-long-line flag.
  631.  
  632.  
  633.  
  634.        -common=num
  635.                 This setting varies the strictness of checking of
  636.               COMMON blocks.
  637.  
  638.               The different levels are:
  639.  
  640.               0:  no checking.
  641.  
  642.               1:  in each declaration of a  given  COMMON  block,
  643.                   corresponding memory locations (words or bytes)
  644.                   must agree in data type.
  645.  
  646.               2:  also warn if different declarations of the same
  647.                   block are not equal in total length.
  648.  
  649.               3:  corresponding  variables in each declaration of
  650.                   a block must agree in data type and (if arrays)
  651.                   in size and number of dimensions.
  652.  
  653.               Default = turn-on = 3.
  654.  
  655.  
  656.  
  657.  
  658.                             4 Apr 1996                         10
  659.  
  660.  
  661.  
  662.  
  663.  
  664. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  665.  
  666.  
  667.               The  Fortran 77 Standard requires each named common
  668.               block, but not blank common, to be the same  length
  669.               in all modules of the program.  Level 3 provides an
  670.               extra degree of checking to support a frequent pro-
  671.               gramming practice.
  672.  
  673.               See also: -library, -usage, -volatile.
  674.  
  675.  
  676.  
  677.        -crossref
  678.                Specifies that a cross-reference table be printed.
  679.               This table lists each subprogram followed by a list
  680.               of  the routines that call it.  Also prints a table
  681.               listing each COMMON block followed by a list of the
  682.               routines that access it.  Default = no.
  683.  
  684.               The  cross-reference  listing omits library modules
  685.               that are not in the call tree of the main  program.
  686.               The  list  is alphabetized.  The routines listed as
  687.               using a COMMON block are those in which some  vari-
  688.               ables  in  the block are accessed, not simply those
  689.               routines that declare the block.  (To find out what
  690.               routines  declare a COMMON block but do not use it,
  691.               see the -usage flag.)
  692.  
  693.               See also: -calltree,  -reference,  -sort,  -symtab,
  694.               -vcg.
  695.  
  696.  
  697.  
  698.        -declare
  699.                 If  this  flag  is  set,  all  identifiers  whose
  700.               datatype is not declared in  each  module  will  be
  701.               listed.   This  flag  is useful for helping to find
  702.               misspelled variable names, etc.  The  same  listing
  703.               will  be  given  if the module contains an IMPLICIT
  704.               NONE statement.  Default = no.
  705.  
  706.               See also: -sixchar, -usage.
  707.  
  708.  
  709.  
  710.        -division
  711.                This switch is provided to help users spot  poten-
  712.               tial  division by zero problems.  If this switch is
  713.               selected, every division except by a constant  will
  714.               be flagged.  (It is assumed that the user is intel-
  715.               ligent enough not to divide by a constant which  is
  716.               equal to zero!)  Default = no.
  717.  
  718.               See also: -portability, -truncation.
  719.  
  720.  
  721.  
  722.  
  723.  
  724.                             4 Apr 1996                         11
  725.  
  726.  
  727.  
  728.  
  729.  
  730. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  731.  
  732.  
  733.        -extern
  734.                 Causes  ftnchek to report whether any subprograms
  735.               invoked by the program are never  defined,  or  are
  736.               multiply  defined.  Ordinarily, if ftnchek is being
  737.               run on a complete program,  each  subprogram  other
  738.               than the intrinsic functions should be defined once
  739.               and only once somewhere.  Turn off this  switch  if
  740.               you just want to check a subset of files which form
  741.               part of a larger complete program, or to check  all
  742.               at  once  a  number  of unrelated files which might
  743.               each contain an unnamed main  program.   Subprogram
  744.               arguments  will  still  be checked for correctness.
  745.               Default = yes.
  746.  
  747.               The -extern flag is now superseded by the  Level  1
  748.               usage  checking  of  subprograms.   For the sake of
  749.               compatibility with earlier versions of ftnchek, the
  750.               -extern  flag  is  retained,  so that  -noextern is
  751.               equivalent to a 0 or 2 in the hundreds place of the
  752.               -usage setting.  However, to avoid anomalous behav-
  753.               ior, you should not use both -extern and -usage  on
  754.               the command line.  Probably the -extern switch will
  755.               be retired eventually.
  756.  
  757.               See also: -library.
  758.  
  759.  
  760.  
  761.        -f77=list
  762.                Use this  setting  to  catch  language  extensions
  763.               which violate the Fortran 77 Standard.  Such exten-
  764.               sions may cause your program not  to  be  portable.
  765.               Examples include the use of underscores in variable
  766.               names; variable names longer than  six  characters;
  767.               statement lines longer than 72 characters; and non-
  768.               standard statements such as the DO ... ENDDO struc-
  769.               ture.  ftnchek does not report on the use of lower-
  770.               case letters.  By default, all warnings are  turned
  771.               off.
  772.  
  773.               This  setting  provides  detailed  control over the
  774.               warnings about supported extensions to the  Fortran
  775.               77  Standard.   The list consists of keywords sepa-
  776.               rated by commas or colons.  There are three special
  777.               keywords:  all  to  turn  on all the warnings about
  778.               nonstandard extensions, none to turn them all  off,
  779.               and help to print the list of all the keywords with
  780.               a brief explanation of each.  If list  is  omitted,
  781.               -f77  is  equivalent  to  -f77=all,  and  -nof77 is
  782.               equivalent to -f77=none.  The warning keywords with
  783.               their meanings are as follows.
  784.  
  785.               (Further  details  about  the extensions themselves
  786.               are given below in the section on Extensions.)
  787.  
  788.  
  789.  
  790.                             4 Apr 1996                         12
  791.  
  792.  
  793.  
  794.  
  795.  
  796. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  797.  
  798.  
  799.               accept-type:
  800.                     ACCEPT and TYPE I/O statements.
  801.  
  802.               backslash:
  803.                     Unix backslash escape in strings.  This warn-
  804.                     ing will be given only if the -source setting
  805.                     value 4  (UNIX  backslash)  is  specified  to
  806.                     cause  the  escape  interpretation  of  back-
  807.                     slash..
  808.  
  809.               byte: BYTE data type declaration.
  810.  
  811.               common-subprog-name:
  812.                     Common block and subprogram having  the  same
  813.                     name.
  814.  
  815.               continuation:
  816.                     More than 19 successive continuation lines.
  817.  
  818.               cpp:  Unix  C preprocessor directives in the source
  819.                     code.
  820.  
  821.               d-comment:
  822.                     Debugging comments starting  with  D  in  the
  823.                     source code.
  824.  
  825.               dec-tab:
  826.                     DEC  Fortran style tab-formatted source code.
  827.                     This  warning  will  be  given  only  if  the
  828.                     -source setting value 1 is specified to cause
  829.                     interpretation of tabs in this style.
  830.  
  831.               do-enddo:
  832.                     DO loop extensions: terminal statement  label
  833.                     omitted, END DO, and WHILE.
  834.  
  835.               double-complex:
  836.                     Double precision complex datatype.
  837.  
  838.               format-dollarsign:
  839.                     Dollar  sign  control  code  in FORMAT state-
  840.                     ments.
  841.  
  842.               format-edit-descr:
  843.                     Nonstandard edit descriptors in FORMAT state-
  844.                     ments.
  845.  
  846.               function-noparen:
  847.                     Function definition without parentheses.
  848.  
  849.               implicit-none:
  850.                     IMPLICIT NONE statement.
  851.  
  852.  
  853.  
  854.  
  855.  
  856.                             4 Apr 1996                         13
  857.  
  858.  
  859.  
  860.  
  861.  
  862. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  863.  
  864.  
  865.               include:
  866.                     INCLUDE statement.
  867.  
  868.               inline-comment:
  869.                     Inline  comments starting with an exclamation
  870.                     point.
  871.  
  872.               internal-list-io:
  873.                     List-directed I/O  to  or  from  an  internal
  874.                     file.
  875.  
  876.               intrinsic:
  877.                     Nonstandard intrinsic functions.
  878.  
  879.               long-line:
  880.                     Statements   with  meaningful  code  past  72
  881.                     columns.  This warning is given only  if  the
  882.                     -columns  setting  has  been used to increase
  883.                     the statement field width.
  884.  
  885.               long-name:
  886.                     Identifiers over 6 characters long.
  887.  
  888.               mixed-common:
  889.                     Mixed character and noncharacter data in COM-
  890.                     MON block.
  891.  
  892.               mixed-expr:
  893.                     Nonstandard type combinations in expressions,
  894.                     for example DOUBLE  PRECISION  with  COMPLEX,
  895.                     assigning hollerith to integer, logical oper-
  896.                     ations on integers.
  897.  
  898.               name-dollarsign:
  899.                     Dollar sign used as a  character  in  identi-
  900.                     fiers.
  901.  
  902.               name-underscore:
  903.                     Underscore  used  as  a  character in identi-
  904.                     fiers.
  905.  
  906.               namelist:
  907.                     NAMELIST statement.
  908.  
  909.               param-intrinsic:
  910.                     Intrinsic function  or  exponentiation  by  a
  911.                     real  used to define the value of a PARAMETER
  912.                     definition.
  913.  
  914.               param-noparen:
  915.                     PARAMETER statement without parentheses.
  916.  
  917.               pointer:
  918.                     ``Cray pointer'' syntax.
  919.  
  920.  
  921.  
  922.                             4 Apr 1996                         14
  923.  
  924.  
  925.  
  926.  
  927.  
  928. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  929.  
  930.  
  931.               quad-constant:
  932.                     Quad precision real constants,  e.g.  of  the
  933.                     form 1.23Q4.
  934.  
  935.               quotemark:
  936.                     Strings  delimited by quote marks rather than
  937.                     apostrophes.
  938.  
  939.               statement-order
  940.                     Statements out of the  sequence  mandated  by
  941.                     the Standard.  The allowed sequence is illus-
  942.                     trated in Table 1 in the  section  on  Inter-
  943.                     preting the Output.
  944.  
  945.               typeless-constant:
  946.                     Typeless constants, for example Z'19AF.
  947.  
  948.               type-size:
  949.                     Type  declarations  specifying  a  size,  for
  950.                     example REAL*8.
  951.  
  952.               variable-format:
  953.                     Variable repeat specification or  field  size
  954.                     in FORMAT.  These are of the form < expr >.
  955.  
  956.               vms-io:
  957.                     The  following  VMS  Fortran keywords used in
  958.                     I/O statements:
  959.  
  960.                     NAME (in OPEN; it is standard only in INQUIRE)
  961.                     BLOCKSIZE         EXTENDSIZE        READONLY
  962.                     BUFFERCOUNT       INITIALSIZE       RECORDSIZE
  963.                     CARRIAGECONTROL   MAXREC            RECORDTYPE
  964.                     DEFAULTFILE       NOSPANBLOCK       SHARED
  965.                     DISP              ORGANIZATION      TYPE
  966.                     DISPOSE
  967.  
  968.  
  969.               See also: -portability, -pretty, -wordsize.
  970.  
  971.  
  972.  
  973.        -help   Prints a list of all the command-line options with
  974.               a  short description of each along with its default
  975.               value.  This command is identical  in  function  to
  976.               the  ``?''   argument,  and is provided as a conve-
  977.               nience for those systems in which the question mark
  978.               has  special  meaning  to  the command interpreter.
  979.               Default = no.
  980.  
  981.               The help listing also prints the version number and
  982.               patch level of ftnchek and a copyright notice.
  983.  
  984.               Note:  the  ``default''  values  printed  in square
  985.  
  986.  
  987.  
  988.                             4 Apr 1996                         15
  989.  
  990.  
  991.  
  992.  
  993.  
  994. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  995.  
  996.  
  997.               brackets in the help listing are,  strictly  speak-
  998.               ing, not the built-in defaults but the current val-
  999.               ues after any environment options and any  command-
  1000.               line  options  preceding the -help option have been
  1001.               processed.
  1002.  
  1003.               See also: -version,  -f77=help,  -portability=help,
  1004.               -pretty=help, -truncation=help.
  1005.  
  1006.  
  1007.  
  1008.        -include=path
  1009.                 Specifies  a  directory  to be searched for files
  1010.               specified by INCLUDE statements.  Unlike other com-
  1011.               mand-line options, this setting is cumulative; that
  1012.               is, if it is given more than once  on  the  command
  1013.               line,  all  the directories so specified are placed
  1014.               on a list that will be searched in the  same  order
  1015.               as  they  are  given.   The  order in which ftnchek
  1016.               searches for a file to be included is: the  current
  1017.               directory;  the  directory specified by environment
  1018.               variable FTNCHEK_INCLUDE if  any;  the  directories
  1019.               specified  by  any  -include options; the directory
  1020.               specified  by  environment  variable  INCLUDE;  and
  1021.               finally   in   a   standard   systemwide  directory
  1022.               (/usr/include for UNIX, SYS$LIBRARY  for  VMS,  and
  1023.               \include for MSDOS).
  1024.  
  1025.  
  1026.  
  1027.        -intrinsic=num
  1028.                 Controls treatment of nonstandard intrinsic func-
  1029.               tions.  The setting consists of three digits.   The
  1030.               ones  digit  selects the set of intrinsic functions
  1031.               to be supported.  Set 0  selects  only  Fortran  77
  1032.               standard  intrinsics  plus  those needed to support
  1033.               the  nonstandard  extended  precision  data  types.
  1034.               These  include  intrinsics  for  the double complex
  1035.               data type:
  1036.  
  1037.                   CDABS    CDSQRT   DREAL    ZLOG
  1038.                   CDCOS    DCMPLX   IMAG     ZSIN
  1039.                   CDEXP    DCONJG   ZABS     ZSQRT
  1040.                   CDLOG    DIMAG    ZEXP     ZCOS
  1041.                   CDSIN
  1042.  
  1043.               and for the quad precision and quad complex types:
  1044.  
  1045.                   CQABS    QARCOS   QEXT     QNINT
  1046.                   CQCOS    QARSIN   QEXTD    QPROD
  1047.                   CQEXP    QATAN    QFLOAT   QREAL
  1048.                   CQLOG    QATAN2   QIMAG    QSIGN
  1049.                   CQSIN    QCMPLX   QINT     QSIN
  1050.                   CQSQRT   QCONJG   QLOG     QSINH
  1051.  
  1052.  
  1053.  
  1054.                             4 Apr 1996                         16
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1061.  
  1062.  
  1063.                   DBLEQ    QCOS     QLOG10   QSQRT
  1064.                   IQINT    QCOSH    QMAX1    QTAN
  1065.                   IQNINT   QDIM     QMIN1    QTANH
  1066.                   QABS     QEXP     QMOD     SNGLQ
  1067.  
  1068.               Set 1 includes set 0 as well as the following  com-
  1069.               monly  available  intrinsics   (all except EXIT and
  1070.               LOC are defined in MIL-STD 1753):
  1071.  
  1072.                   BTEST    IBCLR    IEOR     ISHFTC
  1073.                   EXIT     IBITS    IOR      LOC
  1074.                   IAND     IBSET    ISHFT    NOT
  1075.  
  1076.               Set 2  includes  set  1,  plus  these  common  Unix
  1077.               intrinsic functions:
  1078.  
  1079.                   ABORT    GMTIME   LTIME    SRAND
  1080.                   AND      IARGC    OR       SYSTEM
  1081.                   GETARG   IRAND    RAND     TIME
  1082.                   GETENV   LSHIFT   RSHIFT   XOR
  1083.  
  1084.               Set  3  includes set 1, plus these common VMS func-
  1085.               tions:
  1086.  
  1087.                   DATE     IDATE    SECNDS   TIME
  1088.                   ERRSNS   RAN      SIZEOF
  1089.  
  1090.               The tens digit of this setting controls the  syntax
  1091.               of  the  RAND  intrinsic  function.   Specify  0 to
  1092.               require invocation with no argument, 1  to  require
  1093.               one argument, and 2 to allow either form.  The hun-
  1094.               dreds digits controls the syntax of the IARGC func-
  1095.               tion in the same way.
  1096.  
  1097.               Note  that  this  setting  does not control whether
  1098.               non-standard warnings are issued about these  func-
  1099.               tions.   It  controls  whether  the  functions  are
  1100.               assumed to be intrinsic or  not,  which  determines
  1101.               how  their usage is checked.  When functions in any
  1102.               of these sets are included, their invocations  will
  1103.               be checked according to the rules for the intrinsic
  1104.               functions; otherwise they will be checked as normal
  1105.               (user-written)  external  functions.  The non-stan-
  1106.               dard warnings are controlled by the  -f77=intrinsic
  1107.               option.
  1108.  
  1109.               Default  setting  = turn-on = 222 for the Unix ver-
  1110.               sion, 223 for the VMS  version,  and  221  for  all
  1111.               other versions of ftnchek.  Turn-off = 0.
  1112.  
  1113.  
  1114.  
  1115.        -library
  1116.                 This  switch is used when a number of subprograms
  1117.  
  1118.  
  1119.  
  1120.                             4 Apr 1996                         17
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1127.  
  1128.  
  1129.               are contained in a file, but not all  of  them  are
  1130.               used  by  the application.  Normally, ftnchek warns
  1131.               you if any subprograms are defined but never  used.
  1132.               This  switch will suppress these warnings.  Default
  1133.               = no.
  1134.  
  1135.               This switch also controls  which  subprogram  calls
  1136.               and  COMMON  block  declarations are checked.  If a
  1137.               file is read with the -library flag in effect,  the
  1138.               subprogram  calls and COMMON declarations contained
  1139.               in a routine in that file will be checked  only  if
  1140.               that  routine  is  in the main program's call tree.
  1141.               On the other hand, if the -library switch is turned
  1142.               off, then ftnchek checks the calls of every routine
  1143.               by every other routine, regardless of whether those
  1144.               routines  could  ever  actually  be  invoked at run
  1145.               time, and likewise all  COMMON  block  declarations
  1146.               are compared for agreement.
  1147.  
  1148.               The  difference  between this switch and the -usage
  1149.               level 2 setting for subprograms is that the  latter
  1150.               suppresses  only  the  warning about routines being
  1151.               declared but not used.  The  -library  switch  goes
  1152.               further  and  excludes  unused  routines  processed
  1153.               while it is in effect from  all  cross-checking  of
  1154.               arguments and COMMON block declarations as well.
  1155.  
  1156.               (If there is no main program anywhere in the set of
  1157.               files that ftnchek has read, so that  there  is  no
  1158.               call  tree,  then  ftnchek  will  look for any non-
  1159.               library routines that are not called by  any  other
  1160.               routine,  and use these as substitutes for the main
  1161.               program in constructing the call tree and  deciding
  1162.               what  to  check.   If no such top-level non-library
  1163.               routines are found, then all inter-module calls and
  1164.               all COMMON declarations will be checked.)
  1165.  
  1166.               See  also: -arguments, -calltree, -common, -extern,
  1167.               -usage.
  1168.  
  1169.  
  1170.  
  1171.        -list   Specifies that a listing of the Fortran program is
  1172.               to  be  printed  out with line numbers.  If ftnchek
  1173.               detects an error, the  error  message  follows  the
  1174.               program  line  with  a  caret  ( ^ ) specifying the
  1175.               location of the error.  If no  source  listing  was
  1176.               requested,  ftnchek  will  still print out any line
  1177.               containing an error, to aid the user in determining
  1178.               where the error occurred.  Default = no.
  1179.  
  1180.               See also: -symtab, -quiet.
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.                             4 Apr 1996                         18
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1193.  
  1194.  
  1195.        -makedcls=num
  1196.                Prepare a neatly-formatted file of declarations of
  1197.               variables, common blocks, and namelist  lists,  for
  1198.               possible  merging into the source code.  The decla-
  1199.               rations are stored in a file of the  same  name  as
  1200.               the  source code, but with the extension changed to
  1201.               .dcl.  If no declarations are written to the  file,
  1202.               it is deleted to reduce clutter from empty files.
  1203.  
  1204.               If  input  comes  from standard input, instead of a
  1205.               named file, then declarations are written to  stan-
  1206.               dard output.
  1207.  
  1208.               Variables are declared in alphabetical order within
  1209.               each declaration class and type, with integer vari-
  1210.               ables first, because of their later possible use in
  1211.               array dimensions.
  1212.  
  1213.               PARAMETER statements are an exception to the alpha-
  1214.               betical order rule, because the Fortran 77 Standard
  1215.               requires that the  expressions  defining  parameter
  1216.               values  refer only to constants and already-defined
  1217.               parameter names.  This forces the  original  source
  1218.               file  order  of  such statements to be preserved in
  1219.               the declaration files.
  1220.  
  1221.               Explicit declaration of all variables is considered
  1222.               good  modern  programming  practice.  By using com-
  1223.               piler options to reject undeclared variables,  mis-
  1224.               spelled  variable  names  (or  names extending past
  1225.               column 72) can be caught at compile time.  Explicit
  1226.               declarations   also   greatly  facilitate  changing
  1227.               floating-point  precision  with  filters  such   as
  1228.               dtoq(1L),  dtos(1L),  fd2s(1L), fs2d(1L), qtod(1L),
  1229.               and stod(1L).  These programs are capable of chang-
  1230.               ing  types of explicit floating-point type declara-
  1231.               tions,  intrinsic  functions,  and  constants,  but
  1232.               because  they do not carry out rigorous lexical and
  1233.               grammatical analysis of the  Fortran  source  code,
  1234.               they  cannot provide modified type declarations for
  1235.               undeclared variables.  Default setting = 0, turn-on
  1236.               = 1.
  1237.  
  1238.               The setting values are given by the sum of selected
  1239.               option values from the following list:
  1240.  
  1241.               0:    Do not write a declaration file.
  1242.  
  1243.               1:    Write a declaration file.
  1244.  
  1245.               2:    Normally, all variables are included  in  the
  1246.                     declaration  file.  With this option, include
  1247.                     only undeclared variables.  This  setting  is
  1248.                     useful  if  you  want to check for undeclared
  1249.  
  1250.  
  1251.  
  1252.                             4 Apr 1996                         19
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1259.  
  1260.  
  1261.                     variables, since Fortran  source  files  with
  1262.                     all  variables  properly  declared  will  not
  1263.                     result in a .dcl  file.   With  this  option,
  1264.                     common  blocks and namelist lists will not be
  1265.                     included in the declaration  file,  since  by
  1266.                     their nature they cannot be undeclared.
  1267.  
  1268.               4:    The  declarations  are normally prettyprinted
  1269.                     to line up neatly in common  columns,  as  in
  1270.                     the  declaration files output by the Extended
  1271.                     PFORT Verifier, pfort(1L).  This option value
  1272.                     selects  instead compact output, without col-
  1273.                     umn alignment.
  1274.  
  1275.               8:    Causes continuation lines to  be  used  where
  1276.                     permissible.   The  default is to begin a new
  1277.                     declaration on each  line.   This  option  is
  1278.                     appropriate  to  use with the option for com-
  1279.                     pact output.
  1280.  
  1281.               16:   Output Fortran keywords in lowercase, instead
  1282.                     of the default uppercase.
  1283.  
  1284.               32:   Output  variables and constants in lowercase,
  1285.                     instead of the default uppercase.   Character
  1286.                     string  constants  are  not  affected by this
  1287.                     option.
  1288.  
  1289.               64:   Omit declarations of internal  integer  vari-
  1290.                     ables  produced  by the SFTRAN3 preprocessor,
  1291.                     xsf3(1L),  as  part  of  the  translation  of
  1292.                     structured  Fortran  statements  to  ordinary
  1293.                     Fortran.  These variables have  six-character
  1294.                     names of the form NPRddd, NXdddd, N2dddd, and
  1295.                     N3dddd, where d is a decimal digit.   Because
  1296.                     they  are  invisible  in  the  SFTRAN3 source
  1297.                     code, and will change if the SFTRAN3 code  is
  1298.                     modified,   such   variables  should  not  be
  1299.                     explicitly declared.   Instead,  they  should
  1300.                     just  assume the default Fortran INTEGER data
  1301.                     type based on their initial letter, N.
  1302.  
  1303.               128:  Use an asterisk as the comment character; the
  1304.                     default is otherwise 'C'.
  1305.  
  1306.               256:  Use  'c' instead of 'C' or '*' as the comment
  1307.                     character.
  1308.  
  1309.               512:  Suppress dimensioning of arrays in the gener-
  1310.                     ated  declarations.   This  option is for use
  1311.                     with code lacking type declarations, to allow
  1312.                     the  declaration files to be inserted without
  1313.                     change into the code.  Since  the  code  will
  1314.                     have     dimension     statements    already,
  1315.  
  1316.  
  1317.  
  1318.                             4 Apr 1996                         20
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1325.  
  1326.  
  1327.                     dimensioning the array variables in the  type
  1328.                     statements  of the declaration file is redun-
  1329.                     dant.  This option should  be  used  only  in
  1330.                     conjunction  with  option 2 = undeclared-only
  1331.                     because otherwise any arrays that were dimen-
  1332.                     sioned  in  a  type statement will lose their
  1333.                     dimensioning.
  1334.  
  1335.               If any non-zero value is specified,  then  declara-
  1336.               tion  output  is  selected, even if the value 1 was
  1337.               not included in the sum.
  1338.  
  1339.               The declaration files contain distinctive  comments
  1340.               that  mark  the  start  and end of declarations for
  1341.               each program unit, to facilitate using text  editor
  1342.               macros  for  merging the declarations back into the
  1343.               source code.
  1344.  
  1345.               The  ftnchek  distribution  includes   a   program,
  1346.               dcl2inc,  which processes declaration files to pro-
  1347.               duce files containing declarations  of  all  COMMON
  1348.               blocks,  in  a  form  suitable  for  use as INCLUDE
  1349.               files.  See the dcl2inc man page for the details of
  1350.               its use.
  1351.  
  1352.  
  1353.  
  1354.        -novice
  1355.                This flag is intended to provide more helpful out-
  1356.               put for beginners.  It has two effects:
  1357.  
  1358.               (a) provides an extra message to the effect that  a
  1359.                   function  that is used but not defined anywhere
  1360.                   might be an array  which  the  user  forgot  to
  1361.                   declare  in  a  DIMENSION  statement (since the
  1362.                   syntax of an array reference  is  the  same  as
  1363.                   that of a function reference).
  1364.  
  1365.               (b) modifies  the  form  of  the error messages and
  1366.                   warnings.   If  the  flag  is  turned  off   by
  1367.                   -nonovice,  these  messages  are  printed  in a
  1368.                   style more resembling UNIX lint.
  1369.  
  1370.               Default = yes.
  1371.  
  1372.  
  1373.  
  1374.  
  1375.        -output=filename
  1376.                This setting is provided for convenience  on  sys-
  1377.               tems  which do not allow easy redirection of output
  1378.               from programs.  When this  setting  is  given,  the
  1379.               output which normally appears on the screen will be
  1380.               sent instead to the  named  file.   Note,  however,
  1381.  
  1382.  
  1383.  
  1384.                             4 Apr 1996                         21
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1391.  
  1392.  
  1393.               that operational errors of ftnchek itself (e.g. out
  1394.               of space or cannot open file) will still be sent to
  1395.               the  screen.   The  extension  for  the filename is
  1396.               optional, and if no extension is given, the  exten-
  1397.               sion .lis will be used.
  1398.  
  1399.  
  1400.  
  1401.        -portability=list
  1402.                 ftnchek  will give warnings for a variety of non-
  1403.               portable usages.  Examples include the use of  tabs
  1404.               except  in  comments  or inside strings, the use of
  1405.               Hollerith constants, and the equivalencing of vari-
  1406.               ables  of  different  data types.  This option does
  1407.               not produce warnings for  supported  extensions  to
  1408.               the  Fortran  77  Standard,  which  may  also cause
  1409.               portability problems.  To catch those, use the -f77
  1410.               setting.   By default, all warnings are turned off.
  1411.  
  1412.               This setting provides  detailed  control  over  the
  1413.               warnings  about possible portability problems.  The
  1414.               list consists of keywords separated  by  commas  or
  1415.               colons.   There  are three special keywords: all to
  1416.               turn on all the warnings about nonportable  usages,
  1417.               none  to  turn  them all off, and help to print the
  1418.               list of all the keywords with a  brief  explanation
  1419.               of  each.   If  list  is  omitted,  -portability is
  1420.               equivalent to -portability=all, and  -noportability
  1421.               is  equivalent  to  -portability=none.  The warning
  1422.               keywords with their meanings are as follows:
  1423.  
  1424.               backslash:
  1425.                     Backslash character in strings.   Since  some
  1426.                     compilers  treat  the  backslash as an escape
  1427.                     character, its presence  can  cause  problems
  1428.                     even though it is used in a standard-conform-
  1429.                     ing way.
  1430.  
  1431.               common-alignment:
  1432.                     COMMON  block  variables  not  in  descending
  1433.                     order   of   storage  size.   Some  compilers
  1434.                     require  this  ordering  because  of  storage
  1435.                     alignment requirements.
  1436.  
  1437.               hollerith:
  1438.                     Hollerith constants (other than within FORMAT
  1439.                     specifications).  The Hollerith data type  is
  1440.                     a feature of Fortran IV that has been deleted
  1441.                     in the Fortran 77 standard.  It is superseded
  1442.                     by  the  character  data  type.  Storing Hol-
  1443.                     lerith data in variables of a numeric or log-
  1444.                     ical  data type is nonportable due to differ-
  1445.                     ing word sizes.
  1446.  
  1447.  
  1448.  
  1449.  
  1450.                             4 Apr 1996                         22
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1457.  
  1458.  
  1459.               long-string:
  1460.                     String constants, variables,  or  expressions
  1461.                     over 255 chars long.
  1462.  
  1463.               mixed-equivalence:
  1464.                     Variables  of  different  data  types equiva-
  1465.                     lenced.
  1466.  
  1467.               mixed-size:
  1468.                     Variables  declared  with  default  precision
  1469.                     used with variables given explicit precision,
  1470.                     in expressions, assignments, or as arguments.
  1471.                     For example, if a variable declared as REAL*8
  1472.                     is treated as equivalent to DOUBLE PRECISION.
  1473.  
  1474.               real-do:
  1475.                     Non-integer  DO loop index and bounds.  These
  1476.                     can cause a program's results  to  depend  on
  1477.                     the  hardware characteristics of the particu-
  1478.                     lar computer used.
  1479.  
  1480.               tab:  Tabs in source code.   Tabs  are  interpreted
  1481.                     differently  by  different  compilers.   This
  1482.                     warning will be given only once, at  the  end
  1483.                     of the file.
  1484.  
  1485.               See also: -f77, -hollerith, -pretty, -wordsize.
  1486.  
  1487.  
  1488.  
  1489.        -pretty=list
  1490.                 Controls  certain messages related to the appear-
  1491.               ance of the source code.  These warn  about  things
  1492.               that  might  make  a  program  less  readable or be
  1493.               deceptive to the reader.  By default, all  warnings
  1494.               are turned on.
  1495.  
  1496.               This  setting  provides  detailed  control over the
  1497.               warnings about appearance.  The  list  consists  of
  1498.               keywords  separated by commas or colons.  Since all
  1499.               warnings are on by default, include a keyword  pre-
  1500.               fixed  by  no-  to  turn  off a particular warning.
  1501.               There are three special keywords: all  to  turn  on
  1502.               all the warnings about misleading appearances, none
  1503.               to turn them all off, and help to print the list of
  1504.               all  the keywords with a brief explanation of each.
  1505.               If  list  is  omitted,  -pretty  is  equivalent  to
  1506.               -pretty=all,   and   -nopretty   is  equivalent  to
  1507.               -pretty=none.   The  warning  keywords  with  their
  1508.               meanings are as follows:
  1509.  
  1510.               embedded-space:
  1511.                     Space embedded in variable names.
  1512.  
  1513.  
  1514.  
  1515.  
  1516.                             4 Apr 1996                         23
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1523.  
  1524.  
  1525.               continuation:
  1526.                     Continuation mark following a comment line.
  1527.  
  1528.               long-line:
  1529.                     Lines  (except  comments)  over 72 columns in
  1530.                     width (beyond 72 is normally ignored by  com-
  1531.                     piler).
  1532.  
  1533.               missing-space:
  1534.                     Lack  of space between variable and a preced-
  1535.                     ing keyword.
  1536.  
  1537.               multiple-common:
  1538.                     COMMON block declared in multiple statements.
  1539.                     No  warning  is  given  if the statements are
  1540.                     consecutive except for comment lines.
  1541.  
  1542.               multiple-namelist:
  1543.                     NAMELIST declared in multiple statements.  No
  1544.                     warning  is  given if the statements are con-
  1545.                     secutive except for comment lines.
  1546.  
  1547.               parentheses:
  1548.                     Parentheses around a variable by itself.   As
  1549.                     a  subprogram  argument, this makes the argu-
  1550.                     ment an expression,  not  modifiable  by  the
  1551.                     subprogram.
  1552.  
  1553.               See also: -f77, -portability.
  1554.  
  1555.  
  1556.  
  1557.        -project
  1558.                 ftnchek  will  create  a  project  file from each
  1559.               source file that is input while  this  flag  is  in
  1560.               effect.   The  project  file will be given the same
  1561.               name as the input file, but with the  extension  .f
  1562.               or  .for replaced by .prj.  (If input is from stan-
  1563.               dard input, the project file is named ftnchek.prj.)
  1564.               Default = no.
  1565.  
  1566.               A  project  file  contains a summary of information
  1567.               from the source file, for use in checking agreement
  1568.               among  FUNCTION,  SUBROUTINE,  and COMMON usages in
  1569.               other files.  It allows incremental checking, which
  1570.               saves  time  whenever you have a large set of files
  1571.               containing shared subroutines, most of which seldom
  1572.               change.  You can run ftnchek once on each file with
  1573.               the -project flag set, creating the project  files.
  1574.               Usually  you would also set the -library and -noex-
  1575.               tern flags  at  this  time,  to  suppress  messages
  1576.               relating  to  consistency  with  other files.  Only
  1577.               error messages pertaining to each  file  by  itself
  1578.               will  be  printed  at  this  time.  Thereafter, run
  1579.  
  1580.  
  1581.  
  1582.                             4 Apr 1996                         24
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1589.  
  1590.  
  1591.               ftnchek without these  flags  on  all  the  project
  1592.               files together, to check consistency among the dif-
  1593.               ferent files.  All messages internal to  the  indi-
  1594.               vidual files will now be omitted.  Only when a file
  1595.               is altered will a new project file need to be  made
  1596.               for it.
  1597.  
  1598.               Naturally,  when  the -project flag is set, ftnchek
  1599.               will not read project files as input.
  1600.  
  1601.               Project files contain only information  needed  for
  1602.               checking  agreement between files.  This means that
  1603.               a project file is of no use if all modules  of  the
  1604.               complete program are contained in a single file.
  1605.  
  1606.               A  more detailed discussion is given in the section
  1607.               on Using Project Files.
  1608.  
  1609.  
  1610.  
  1611.        -pure   Assume functions are ``pure'', i.e., they will not
  1612.               have  side  effects by modifying their arguments or
  1613.               variables in a COMMON block.  When this flag is  in
  1614.               effect,  ftnchek will base its determination of set
  1615.               and used status of  the  actual  arguments  on  the
  1616.               assumption  that arguments passed to a function are
  1617.               not altered.  It will also issue  a  warning  if  a
  1618.               function is found to modify any of its arguments or
  1619.               any COMMON variables.  Default = yes.
  1620.  
  1621.               When this flag  is  turned  off,  actual  arguments
  1622.               passed to functions will be handled the same way as
  1623.               actual arguments passed to subroutines.  This means
  1624.               that ftnchek will assume that arguments may be mod-
  1625.               ified by the functions.  No warnings will be  given
  1626.               if  a  function  is  found  to  have  side effects.
  1627.               Because stricter checking is possible if  functions
  1628.               are  assumed  to be pure, you should turn this flag
  1629.               off only if your program  actually  uses  functions
  1630.               with side effects.
  1631.  
  1632.  
  1633.  
  1634.        -quiet   This option reduces the amount of output relating
  1635.               to normal operation, so  that  error  messages  are
  1636.               more  apparent.   This  option  is provided for the
  1637.               convenience of users who are checking large  suites
  1638.               of files.  The eliminated output includes the names
  1639.               of project files, and the message reporting that no
  1640.               syntax  errors were found.  (Some of this output is
  1641.               turned back on by the -list and  -symtab  options.)
  1642.               Default = no.
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.                             4 Apr 1996                         25
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1655.  
  1656.  
  1657.        -reference
  1658.                 Specifies  that a who-calls-who table be printed.
  1659.               This table lists each subprogram followed by a list
  1660.               of  the  routines it calls.  This switch is equiva-
  1661.               lent to -calltree=2.  Default = no.
  1662.  
  1663.               The reference list omits routines called by  unused
  1664.               library  modules.  Thus it contains the same infor-
  1665.               mation as for  the  call-tree  format,  namely  the
  1666.               hierarchy  of  subprogram  calls,  but printed in a
  1667.               different way.  This  prints  out  a  breadth-first
  1668.               traversal of the call tree whereas -calltree prints
  1669.               out a depth-first traversal.  Only  one  format  is
  1670.               printed.   If  both  -calltree and -reference flags
  1671.               are given, the former will take precedence.
  1672.  
  1673.               See also: -calltree,  -crossref,  -library,  -sort,
  1674.               -symtab, -vcg.
  1675.  
  1676.  
  1677.  
  1678.        -resources
  1679.                 Prints the amount of resources used by ftnchek in
  1680.               processing the program.  This listing may be useful
  1681.               in  analyzing the size and complexity of a program.
  1682.               It can also  help  in  choosing  larger  sizes  for
  1683.               ftnchek's  internal tables if they are too small to
  1684.               analyze a particular program.  Default = no.
  1685.  
  1686.               In this listing, the term  ``chunk  size''  is  the
  1687.               size of the blocks of memory allocated to store the
  1688.               item in question, in units of the size of one item,
  1689.               not necessarily in bytes.  When the initially allo-
  1690.               cated space is filled up, more memory is  allocated
  1691.               in chunks of this size.  The following is an expla-
  1692.               nation of the items printed:
  1693.  
  1694.               Source lines processed:
  1695.                   Total number of lines of  code,  with  separate
  1696.                   totals  for  statement lines and comment lines.
  1697.                   Comment lines include lines with 'C' or '*'  in
  1698.                   column  1 as well as blank lines and lines con-
  1699.                   taining  only  an  inline  comment.   Statement
  1700.                   lines are all other lines, including lines that
  1701.                   have an inline  comment  following  some  code.
  1702.                   Continuation  lines  are  counted  as  separate
  1703.                   lines.  Lines in include files are counted each
  1704.                   time the file is included.
  1705.  
  1706.               Total executable statements:
  1707.                   Number of statements in the program, other than
  1708.                   specification, data,  statement-function,  FOR-
  1709.                   MAT, ENTRY, and END statements.
  1710.  
  1711.  
  1712.  
  1713.  
  1714.                             4 Apr 1996                         26
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1721.  
  1722.  
  1723.               Total number of modules:
  1724.                   A  module is any external subprogram, including
  1725.                   the main program, subroutines,  functions,  and
  1726.                   block  data  units.   This  count is of modules
  1727.                   defined within the source, not  modules  refer-
  1728.                   enced.   Statement  functions are not included.
  1729.                   A subprogram with multiple entry points is only
  1730.                   counted once.
  1731.  
  1732.               Max identifier name chars:
  1733.                   Number  of  characters used for storing identi-
  1734.                   fier names.  An identifier is a variable,  sub-
  1735.                   program, or common block name.  Local names are
  1736.                   those  of  local  variables  in  a  subprogram,
  1737.                   whereas  global  names  refer to subprogram and
  1738.                   common block names, as well as  dummy  argument
  1739.                   names  and common variable names.  Actual argu-
  1740.                   ment text (up to 15 characters for  each  argu-
  1741.                   ment)  is  also  included here.  The space used
  1742.                   for local names is recovered at the end of each
  1743.                   module,  whereas  the  global space grows until
  1744.                   the whole program is analyzed.   Unfortunately,
  1745.                   this figure may include some common block names
  1746.                   and arguments stored more than once, although a
  1747.                   heuristic is used that will avoid duplicates in
  1748.                   many cases.
  1749.  
  1750.               Max token text chars:
  1751.                   A token is the smallest syntactic unit  of  the
  1752.                   FORTRAN  language above the level of individual
  1753.                   characters. For instance a token can be a vari-
  1754.                   able  name, a numerical constant, a quoted text
  1755.                   string, or a punctuation character.  Token text
  1756.                   is  stored  while  a module is being processed.
  1757.                   For technical reasons, single-character  tokens
  1758.                   are not included in this total.  Items that are
  1759.                   not represented in  the  symbol  table  may  be
  1760.                   duplicated.  The space for token text is recov-
  1761.                   ered at the end of each module, so this  figure
  1762.                   represents the maximum for any one module.
  1763.  
  1764.               Max local symbols:
  1765.                   This  is  the  largest number of entries in the
  1766.                   local symbol table for any module.  Local  sym-
  1767.                   bol  table  entries  include  all variables and
  1768.                   parameters, common block names, statement func-
  1769.                   tions, external subprograms and intrinsic func-
  1770.                   tions referenced by the module.   Literal  con-
  1771.                   stants  are  not  stored  in  the  local symbol
  1772.                   table.
  1773.  
  1774.               Max global symbols:
  1775.                   This is the number of  entries  in  the  global
  1776.                   symbol  table at the end of processing.  Global
  1777.  
  1778.  
  1779.  
  1780.                             4 Apr 1996                         27
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1787.  
  1788.  
  1789.                   symbol table entries include  external  subpro-
  1790.                   gram  and  common block names.  Intrinsic func-
  1791.                   tions and statement functions are not included.
  1792.  
  1793.               Max number of tokenlists:
  1794.                   A token list is a sequence of tokens represent-
  1795.                   ing the actual or dummy argument list of a sub-
  1796.                   program,  or  the list of variables in a common
  1797.                   block or namelist.  Therefore this number  rep-
  1798.                   resents   the  largest  sum  of  COMMON,  CALL,
  1799.                   NAMELIST  and  ENTRY  statements  and  function
  1800.                   invocations  for  any one module.  The space is
  1801.                   recovered at the end of each module.
  1802.  
  1803.               Max token list/tree space:
  1804.                   This is the largest number of tokens in all the
  1805.                   token  lists and token trees of any one module.
  1806.                   A  token  tree  is  formed  when  analyzing  an
  1807.                   expression: each operand is a leaf of the tree,
  1808.                   and the operators  are  the  nodes.   Therefore
  1809.                   this  number  is  a measure of the maximum com-
  1810.                   plexity of an individual module.  For  instance
  1811.                   a  module with many long arithmetic expressions
  1812.                   will have a  high  number.   Note  that  unlike
  1813.                   token  text  described  above,  the  number  of
  1814.                   tokens is independent  of  the  length  of  the
  1815.                   variable  names  or  literal  constants  in the
  1816.                   expressions.
  1817.  
  1818.               Number of subprogram invocations:
  1819.                   This is the sum over all modules of the  number
  1820.                   of  CALL  statements  and  function invocations
  1821.                   (except intrinsic functions and statement func-
  1822.                   tions).
  1823.  
  1824.               Number of common block decls:
  1825.                   This  is the sum over all modules of the number
  1826.                   of common block declarations.   That  is,  each
  1827.                   declaration of a block in a different module is
  1828.                   counted separately.  (The standard allows  mul-
  1829.                   tiple  declarations  of a block within the same
  1830.                   module; these are counted as only one  declara-
  1831.                   tion since they are equivalent to a single long
  1832.                   declaration.)
  1833.  
  1834.               Number of array dim & param ptrs:
  1835.                   This is the sum over all modules of the  number
  1836.                   of  array  dimension  and  parameter definition
  1837.                   text strings saved for  use  by  the  -makedcls
  1838.                   option.   The length of the text strings is not
  1839.                   counted.  Each dimension of a  multidimensional
  1840.                   array is counted separately.
  1841.  
  1842.               These  numbers  are  obviously  not  the  same when
  1843.  
  1844.  
  1845.  
  1846.                             4 Apr 1996                         28
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1853.  
  1854.  
  1855.               project files are used in  place  of  the  original
  1856.               source  code.  Even the numbers for global entities
  1857.               may be different, since some redundant  information
  1858.               is eliminated in project files.
  1859.  
  1860.  
  1861.  
  1862.        -sixchar
  1863.                One of the goals of the ftnchek program is to help
  1864.               users to  write  portable  Fortran  programs.   One
  1865.               potential  source  of  nonportability is the use of
  1866.               variable names that are longer than six characters.
  1867.               Some  compilers  just  ignore the extra characters.
  1868.               This behavior could potentially lead to two differ-
  1869.               ent  variables  being  considered as the same.  For
  1870.               instance, variables  named  AVERAGECOST  and  AVER-
  1871.               AGEPRICE  are the same in the first six characters.
  1872.               If you wish to catch such possible  conflicts,  use
  1873.               this flag.  Default = no.
  1874.  
  1875.               Use  the  -f77=long-names  if  you want to list all
  1876.               variables longer  than  six  characters,  not  just
  1877.               those pairs that are the same in the first six.
  1878.  
  1879.               See also: -f77, -portability.
  1880.  
  1881.  
  1882.  
  1883.        -sort    Specifies  that a sorted list of all modules used
  1884.               in the program be printed.  This list is in  ``pre-
  1885.               requisite'' order, i.e. each module is printed only
  1886.               after all the modules from which it is called  have
  1887.               been  printed.  This is also called a ``topological
  1888.               sort'' of the call tree.   Each  module  is  listed
  1889.               only  once.  Routines that are not in the call tree
  1890.               of the main program are omitted.  If there are  any
  1891.               cycles  in the call graph (illegal in standard For-
  1892.               tran) they will be detected and diagnosed.  Default
  1893.               = no.
  1894.  
  1895.               See   also:   -calltree,   -crossref,   -reference,
  1896.               -symtab, -vcg.
  1897.  
  1898.  
  1899.  
  1900.        -source=num
  1901.                This setting controls certain  options  about  the
  1902.               form of the Fortran source code.  The setting value
  1903.               is the sum of numbers from the following list:
  1904.  
  1905.               1:    Accept  DEC-style  tab-formatted  source.   A
  1906.                     line  beginning  with  an initial tab will be
  1907.                     treated as a new statement  line  unless  the
  1908.                     character  after  the tab is a nonzero digit,
  1909.  
  1910.  
  1911.  
  1912.                             4 Apr 1996                         29
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1919.  
  1920.  
  1921.                     in which case it is treated as a continuation
  1922.                     line.   The next column after the tab or con-
  1923.                     tinuation mark is taken as column 7.  A warn-
  1924.                     ing  will be given in the case where the line
  1925.                     is a  continuation,  if  -f77=dec-tab  is  in
  1926.                     effect.
  1927.  
  1928.               2:    Accept  VMS-style  INCLUDE statements.  These
  1929.                     follow the normal syntax, but with  the  fol-
  1930.                     lowing  additional  features:  (1)  the  file
  1931.                     extension, if not given, defaults to the same
  1932.                     as  a  normal  source file extension; and (2)
  1933.                     the option /LIST or /NOLIST can  be  appended
  1934.                     to  the include-file name, to control listing
  1935.                     of its contents.
  1936.  
  1937.               4:    Handle UNIX-style backslash escapes in  char-
  1938.                     acter strings.  The escape sequence following
  1939.                     the backslash will be evaluated according  to
  1940.                     the  ANSI  standard  for  strings in C: up to
  1941.                     three digits signify an  octal  value,  an  x
  1942.                     signifies  the  start  of  a hexadecimal con-
  1943.                     stant, any of the letters a b f n r t signify
  1944.                     special  control codes, and any other charac-
  1945.                     ter (including newline) signifies the charac-
  1946.                     ter  itself.  When this source code option is
  1947.                     in effect, a warning will  be  given  if  the
  1948.                     -f77=backslash setting is specified.
  1949.  
  1950.                     The  default  behavior  is to treat the back-
  1951.                     slash like any other normal character, but  a
  1952.                     warning  about  portability will be generated
  1953.                     if the -portability flag is set.  Because  of
  1954.                     the  fact that some compilers treat the back-
  1955.                     slash in a nonstandard way,  it  is  possible
  1956.                     for  standard-conforming  programs to be non-
  1957.                     portable if they use the backslash  character
  1958.                     in strings.
  1959.  
  1960.                     Since  ftnchek  does  not  do  much  with the
  1961.                     interpreted string, it is seldom necessary to
  1962.                     use  this  option.   It is needed in order to
  1963.                     avoid spurious warnings only if (a) the  pro-
  1964.                     gram being checked uses backslash to embed an
  1965.                     apostrophe or quote mark in a string  instead
  1966.                     of  using  the standard mechanism of doubling
  1967.                     the delimiter; (b) the backslash is  used  to
  1968.                     escape the end-of-line in order to continue a
  1969.                     string across multiple source lines; or (c) a
  1970.                     PARAMETER definition uses an intrinsic string
  1971.                     function such as LEN with such  a  string  as
  1972.                     argument,  and  that  value  is later used to
  1973.                     define array dimensions, etc.
  1974.  
  1975.  
  1976.  
  1977.  
  1978.                             4 Apr 1996                         30
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  1985.  
  1986.  
  1987.               Default setting = 0, turn-on = 7.
  1988.  
  1989.  
  1990.  
  1991.        -symtab
  1992.                A symbol table will be printed out for  each  mod-
  1993.               ule,  listing all identifiers mentioned in the mod-
  1994.               ule.  This table gives the name of  each  variable,
  1995.               its  datatype,  and  the  number  of dimensions for
  1996.               arrays.  An asterisk (*) indicates that  the  vari-
  1997.               able  has  been implicitly typed, rather than being
  1998.               named in an explicit  type  declaration  statement.
  1999.               The table also lists all subprograms invoked by the
  2000.               module, all COMMON blocks declared, etc.  Default =
  2001.               no.
  2002.  
  2003.               See  also: -calltree, -crossref, -list, -reference,
  2004.               -sort, -vcg.
  2005.  
  2006.  
  2007.  
  2008.        -truncation=list
  2009.                 Warn  about  possible  truncation  (or  roundoff)
  2010.               errors.   Most  of  these  are  related  to integer
  2011.               arithmetic.  By default, all  warnings  are  turned
  2012.               on.
  2013.  
  2014.               This  setting  provides  detailed  control over the
  2015.               warnings about  possible  truncation  errors.   The
  2016.               list  consists  of  keywords separated by commas or
  2017.               colons.  Since all  warnings  are  on  by  default,
  2018.               include  a  keyword  prefixed  by no- to turn off a
  2019.               particular warning.  There are three  special  key-
  2020.               words:  all to turn on all the warnings about trun-
  2021.               cation, none to turn them  all  off,  and  help  to
  2022.               print  the  list  of  all the keywords with a brief
  2023.               explanation of each.  If list is omitted,  -trunca-
  2024.               tion is equivalent to -truncation=all, and -notrun-
  2025.               cation  is  equivalent  to  -truncation=none.   The
  2026.               warning  keywords  with  their meanings are as fol-
  2027.               lows:
  2028.  
  2029.               int-div-exponent:
  2030.                     use of the result of integer division  as  an
  2031.                     exponent.  This suggests that a real quotient
  2032.                     is intended.  An  example  would  be  writing
  2033.                     X**(1/3)  to evaluate the cube root of X. The
  2034.                     correct expression is X**(1./3.).
  2035.  
  2036.               int-div-real:
  2037.                     Conversion  of  an  expression  involving  an
  2038.                     integer division to real.  This suggests that
  2039.                     a real quotient is intended.
  2040.  
  2041.  
  2042.  
  2043.  
  2044.                             4 Apr 1996                         31
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2051.  
  2052.  
  2053.               int-div-zero:
  2054.                     division in an  integer  constant  expression
  2055.                     that yields a result of zero.
  2056.  
  2057.               int-neg-power:
  2058.                     exponentiation  of  an  integer by a negative
  2059.                     integer (which yields zero  unless  the  base
  2060.                     integer  is  1  in magnitude).  This suggests
  2061.                     that a real base is intended.
  2062.  
  2063.               promotion:
  2064.                     automatic conversion  of  a  lower  precision
  2065.                     quantity  to  one  of  higher precision.  The
  2066.                     loss of accuracy for real variables  in  this
  2067.                     process  is  comparable  to the corresponding
  2068.                     demotion.  No warning is given for  promotion
  2069.                     of  integer  quantities to real since this is
  2070.                     ordinarily exact.
  2071.  
  2072.               real-do-index:
  2073.                     use of a non-integer DO index in a loop  with
  2074.                     integer  bounds.   An  integer  DO index with
  2075.                     real bounds is always warned about regardless
  2076.                     of this setting.
  2077.  
  2078.               real-subscript:
  2079.                     use of a non-integer array subscript.
  2080.  
  2081.               significant-figures:
  2082.                     overspecifying  a  single precision constant.
  2083.                     This may indicate  that  a  double  precision
  2084.                     constant was intended.
  2085.  
  2086.               size-demotion:
  2087.                     automatic  conversion  of  a higher precision
  2088.                     quantity to one of  lower  precision  of  the
  2089.                     same  type.  This warning only occurs when an
  2090.                     explicit size is used in declaring  the  type
  2091.                     of  one  or  both  operands in an assignment.
  2092.                     For example, a warning wil be issued where  a
  2093.                     REAL*8  variable  is assigned to a REAL vari-
  2094.                     able, if the default  wordsize  of  4  is  in
  2095.                     effect.   type-demotion: automatic conversion
  2096.                     of a higher  precision  quantity  to  one  of
  2097.                     lower  precision  of  different  type.   This
  2098.                     warning includes conversion of  real  quanti-
  2099.                     ties  to  integer, double precision to single
  2100.                     precision real, and assignment  of  a  longer
  2101.                     character string to a shorter one.
  2102.  
  2103.               The  warnings  about  promotion  and  demotion also
  2104.               apply to complex constants, considering the  preci-
  2105.               sion  to  be  that  of  the real or imaginary part.
  2106.               Warnings about promotions and demotions  are  given
  2107.  
  2108.  
  2109.  
  2110.                             4 Apr 1996                         32
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2117.  
  2118.  
  2119.               only  when  the  conversion  is done automatically,
  2120.               e.g. in expressions of mixed  precision  or  in  an
  2121.               assignment  statement.  If intrinsic functions such
  2122.               as INT are used to perform the conversion, no warn-
  2123.               ing is given.
  2124.  
  2125.               See also: -portability, -wordsize.
  2126.  
  2127.  
  2128.  
  2129.        -usage=num
  2130.                 Warn about unused or possible uninitialized vari-
  2131.               ables, unused common blocks, and  unused  or  unde-
  2132.               fined subprograms.
  2133.  
  2134.               This  setting  is  composed  of  three digits.  The
  2135.               first  digit  (hundreds  place)  controls  warnings
  2136.               about  subprograms (functions and subroutines), the
  2137.               second digit (tens  place)  warnings  about  common
  2138.               blocks  and  common variables,, and the third digit
  2139.               (ones place) warnings about local variables.   Each
  2140.               digit  controls warnings according to the following
  2141.               scale:
  2142.  
  2143.               0:  no warnings.
  2144.  
  2145.               1:  warn about undefined  items:  subprograms  that
  2146.                   are  used but never defined, common block vari-
  2147.                   ables that are used but  never  set,  or  local
  2148.                   variables that are (or may be) used before they
  2149.                   are set.
  2150.  
  2151.               2:  warn about unused items: subprograms  that  are
  2152.                   defined but never used (unless taken in library
  2153.                   mode), common blocks and common variables  that
  2154.                   are   unused,   or  local  variables  that  are
  2155.                   declared or set but never used.
  2156.  
  2157.               3:  give both types of warnings.
  2158.  
  2159.               Default = turn-on = 333.
  2160.  
  2161.               Sometimes ftnchek makes a mistake in  the  warnings
  2162.               about local variable usage.  Usually it errs on the
  2163.               side of giving a warning where no  problem  exists,
  2164.               but  in  rare  cases  it may fail to warn where the
  2165.               problem does exist.  See the section  on  Bugs  for
  2166.               examples.   If variables are equivalenced, the rule
  2167.               used by ftnchek is that a reference to any variable
  2168.               implies  the  same reference to all variables it is
  2169.               equivalenced to.  For arrays, the rule  is  that  a
  2170.               reference to any array element is treated as a ref-
  2171.               erence to all elements of the array.
  2172.  
  2173.  
  2174.  
  2175.  
  2176.                             4 Apr 1996                         33
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2183.  
  2184.  
  2185.               When checking for used-before-set errors  involving
  2186.               COMMON  variables,  ftnchek  does not do a thorough
  2187.               enough analysis of the  calling  sequence  to  know
  2188.               which  routines are called before others.  So warn-
  2189.               ings about this type of error will  only  be  given
  2190.               for  cases in which a variable is used in some rou-
  2191.               tine but not set in any other  routine.    Checking
  2192.               of  individual COMMON variables is done only if the
  2193.               -common setting is 3 (variable by  variable  agree-
  2194.               ment).
  2195.  
  2196.               The  Level  1  value  for subprogram usage checking
  2197.               controls warnings about routines that  are  invoked
  2198.               by  the  program but never defined, or are multiply
  2199.               defined.  Ordinarily, if ftnchek is being run on  a
  2200.               complete  program,  each  subprogram other than the
  2201.               intrinsic functions should be defined once and only
  2202.               once  somewhere.   Set  this digit to 0 or 2 if you
  2203.               just want to check a subset  of  files  which  form
  2204.               part  of a larger complete program, or to check all
  2205.               at once a number of  unrelated  files  which  might
  2206.               each  contain  an unnamed main program.  Subprogram
  2207.               arguments will still be checked for correctness.
  2208.  
  2209.               See also:  -common,  -declare,  -extern,  -library,
  2210.               -volatile.
  2211.  
  2212.  
  2213.  
  2214.        -vcg     Produce the call graph in the form of a VCG graph
  2215.               description.  This description is written to a sep-
  2216.               arate file, with the same stem as the file contain-
  2217.               ing the main program, and suffix .vcg.   This  file
  2218.               is able to be given directly to xvcg(1L) to visual-
  2219.               ize the call graph.  (If input is from the standard
  2220.               input,  then the graph description is sent to stan-
  2221.               dard output.)  This switch is equivalent to  -call-
  2222.               tree=3.  Default = no.
  2223.  
  2224.               The VCG description as created is more complex than
  2225.               it need be. VCG allows graphs and nested subgraphs:
  2226.               each  subroutine  is  created  as a subgraph nested
  2227.               inside its calling routines.  This  allows  you  to
  2228.               interactively  display subgraphs or summarise them.
  2229.  
  2230.               The -vcg option for  ftnchek  was  written  by  Dr.
  2231.               Philip Rubini (p.rubini@cranfield.ac.uk).
  2232.  
  2233.               xvcg is a graph visualisation tool which runs under
  2234.               the X windows system.  It is freely available  from
  2235.               ftp.cs.uni-sb.de.  It  was  written by G. Sander of
  2236.               the University of Saarland, Germany.
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.                             4 Apr 1996                         34
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2249.  
  2250.  
  2251.        -version
  2252.                This option causes ftnchek to print a line  giving
  2253.               the  version  number, release date, and patch level
  2254.               of the program.  If no files  are  given,  it  then
  2255.               exits.   If  files  are  given,  the effect of this
  2256.               option is to  include  the  patch  level  (normally
  2257.               omitted)  in the version information printed at the
  2258.               start of processing.  Default = no.
  2259.  
  2260.               See also: -help.
  2261.  
  2262.  
  2263.  
  2264.        -volatile
  2265.                Assume that COMMON blocks are volatile.  Default =
  2266.               no.
  2267.  
  2268.               Many  Fortran  programmers  assume  that variables,
  2269.               whether local or in COMMON, are static,  i.e.  that
  2270.               once  assigned a value, they retain that value per-
  2271.               manently until assigned a different  value  by  the
  2272.               program.   However, in fact the Fortran 77 Standard
  2273.               does not require this to be the case.  Local  vari-
  2274.               ables may become undefined between activations of a
  2275.               module in which they are declared.  Similarly, COM-
  2276.               MON  blocks  may  become  undefined if no module in
  2277.               which they are declared is active.  (The  technical
  2278.               term  for  entities  with  this behavior is ``auto-
  2279.               matic'', but ftnchek  uses  the  word  ``volatile''
  2280.               since  it  is  clearer to the nonspecialist.)  Only
  2281.               COMMON blocks declared  in  a  SAVE  statement,  or
  2282.               declared  in  the  main  program or in a block data
  2283.               subprogram remain defined as long as the program is
  2284.               running.   Variables  and  COMMON  blocks  that can
  2285.               become undefined at some point are called volatile.
  2286.  
  2287.               If  the  -volatile  flag is turned on, ftnchek will
  2288.               warn you if it finds a volatile COMMON block.   If,
  2289.               at  the  same  time,  the  -usage setting is 1 or 3
  2290.               (check used before set), ftnchek will try to  check
  2291.               whether  such  a  block can lose its defined status
  2292.               between activations of  the  modules  where  it  is
  2293.               declared.   ftnchek  does not do a very good job of
  2294.               this: the rule used is to see whether the block  is
  2295.               declared  in  two  separated  subtrees  of the call
  2296.               tree.  For instance, this would be the case if  two
  2297.               modules,  both called from the main program, shared
  2298.               a volatile COMMON block.  A block can  also  become
  2299.               undefined  between two successive calls of the same
  2300.               subprogram, but ftnchek is not smart enough to tell
  2301.               whether  a subprogram can be called more than once,
  2302.               so this case is not checked for.
  2303.  
  2304.               The -volatile flag does not affect the way  ftnchek
  2305.  
  2306.  
  2307.  
  2308.                             4 Apr 1996                         35
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2315.  
  2316.  
  2317.               checks the usage of local variables.
  2318.  
  2319.               See also: -common, -usage.
  2320.  
  2321.  
  2322.  
  2323.        -wordsize=num
  2324.                 Specifies  the default word size to be num bytes.
  2325.               This is the size of  logical  and  single-precision
  2326.               numeric  variables that are not given explicit pre-
  2327.               cisions.  (Explicit  precisions  for  non-character
  2328.               variables  are an extension to the Fortran 77 Stan-
  2329.               dard, and are given by type  declarations  such  as
  2330.               REAL*8  X.)  Double-precision and complex variables
  2331.               will be twice this value, and double complex  vari-
  2332.               ables  four  times.   Quad-precision  constants and
  2333.               intrinsic function results will be four times  this
  2334.               value.   Note  that  variables  declared as REAL*16
  2335.               will be regarded as quad precision only if the word
  2336.               size is 4 bytes.  Default = turn-on = 4 bytes.
  2337.  
  2338.               The  word  size  value does not matter for checking
  2339.               standard-conforming programs that  do  not  declare
  2340.               explicit  precisions for non-character variables or
  2341.               store Hollerith data in  variables.   This  setting
  2342.               also  does not affect the default size of character
  2343.               variables, which is always 1 byte.  Hollerith  con-
  2344.               stants  also are assumed to occupy 1 byte per char-
  2345.               acter.
  2346.  
  2347.               The word size is used to determine whether  trunca-
  2348.               tion  occurs in assignment statements, and to catch
  2349.               precision mismatches in subprogram  argument  lists
  2350.               and  common  block  lists.  The exact warnings that
  2351.               are issued will  depend  on  the  status  of  other
  2352.               flags.   Under both the -portability=mixed-size and
  2353.               the -nowordsize flag, any mixing of  explicit  with
  2354.               default  precision  objects  (character expressions
  2355.               not included) is warned  about.   This  applies  to
  2356.               arithmetic  expressions  containing  both  types of
  2357.               objects, and to  subprogram  arguments  and  COMMON
  2358.               variables.   Under control of the -truncation=demo-
  2359.               tion and promotion options, a warning is given  for
  2360.               assignment  of  an expression to a shorter variable
  2361.               of the same type, or for promotion of a lower  pre-
  2362.               cision  value  to higher precision in an arithmetic
  2363.               expression or an assignment statement.
  2364.  
  2365.               Giving a word size of  0,  or  equivalently,  using
  2366.               -nowordsize  means  that  no  default value will be
  2367.               assumed.  This is equivalent to specifying  -porta-
  2368.               bility=mixed-size.   Use it to find cases of mixing
  2369.               default and explicit precision, for example to flag
  2370.               places  where  REAL*8  is  treated as equivalent to
  2371.  
  2372.  
  2373.  
  2374.                             4 Apr 1996                         36
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2381.  
  2382.  
  2383.               DOUBLE PRECISION.
  2384.  
  2385.               See also: -portability, -truncation.
  2386.  
  2387.  
  2388.  
  2389.        -wrap=col
  2390.                Controls the wrapping  of  error  messages.   Long
  2391.               error  messages  that  would run past the specified
  2392.               column  will  be  broken  up  into  separate  lines
  2393.               between  the  words of the message for better read-
  2394.               ability.  If turned off with -nowrap, each separate
  2395.               error  message will be printed on one line, leaving
  2396.               it up to the display to wrap the message  or  trun-
  2397.               cate it.  Default = turn-on = 79.
  2398.  
  2399.  
  2400.  
  2401. CHANGING THE DEFAULTS
  2402.          ftnchek includes two mechanisms for changing the default
  2403.        values of all options: by defining  environment  variables
  2404.        or  by  creating  a preferences file.  When ftnchek starts
  2405.        up, it looks in its environment for  any  variables  whose
  2406.        names  are  composed by prefixing the string FTNCHEK_ onto
  2407.        the uppercased version of the  option  name.   If  such  a
  2408.        variable  is  found,  its  value  is  used  to specify the
  2409.        default for the corresponding switch or setting.   In  the
  2410.        case of settings (for example, the -common strictness set-
  2411.        ting) the value of the environment variable is read as the
  2412.        default  setting  value.   In  the  case  of switches, the
  2413.        default switch will be taken as true  or  yes  unless  the
  2414.        environment variable has the value 0 or NO.
  2415.  
  2416.        Note  that  the  environment  variable  name  must be con-
  2417.        structed with the full-length option name, which  must  be
  2418.        in uppercase.  For example, to make ftnchek print a source
  2419.        listing  by  default,   set   the   environment   variable
  2420.        FTNCHEK_LIST  to  1 or YES or anything other than 0 or NO.
  2421.        The names  FTNCHEK_LIS  (not  the  full  option  name)  or
  2422.        ftnchek_list (lower case) would not be recognized.
  2423.  
  2424.  
  2425.        Here are some examples of how to set environment variables
  2426.        on various systems.  For simplicity, all the examples  set
  2427.        the default -list switch to YES.
  2428.  
  2429.        1. UNIX, Bourne shell:        $ FTNCHEK_LIST=YES
  2430.                                      $ export FTNCHEK_LIST
  2431.  
  2432.        2. UNIX, C shell:             % setenv FTNCHEK_LIST YES
  2433.  
  2434.        3. VAX/VMS:                   $ DEFINE FTNCHEK_LIST YES
  2435.  
  2436.        4. MSDOS:                     $ SET FTNCHEK_LIST=YES
  2437.  
  2438.  
  2439.  
  2440.                             4 Apr 1996                         37
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2447.  
  2448.  
  2449.        After  processing any environment variables, ftnchek looks
  2450.        for a preferences file containing  options  and  settings.
  2451.        It  will  search  in  the  following order, using only the
  2452.        first file found: (1) .ftnchekrc in the current directory,
  2453.        (2)  ftnchek.ini  in the current directory, (3) .ftnchekrc
  2454.        in the user's home directory, (4) ftnchek.ini in the  home
  2455.        directory.   If  such a file is found, the options defined
  2456.        in it are used  as  defaults  in  place  of  the  built-in
  2457.        defaults  and  overriding any defaults set in the environ-
  2458.        ment..
  2459.  
  2460.        Each option or setting in the preferences file must be  on
  2461.        a  separate  line.   They are given in the same form as on
  2462.        the command line, except without the  initial  dash.   The
  2463.        preferences  file  can  contain  blank lines and comments.
  2464.        Comments are introduced at any point in a line by a  space
  2465.        character  (blank  or  tab)  or the '#' character, and are
  2466.        terminated by the end of the line.
  2467.  
  2468.        Command-line options override  the  defaults  set  in  the
  2469.        environment  or  in the preferences file, in  the same way
  2470.        as they override the built-in defaults.
  2471.  
  2472.  
  2473.  
  2474. USING PROJECT FILES
  2475.         This section contains detailed information on how to  use
  2476.        project files most effectively, and how to avoid some pit-
  2477.        falls.
  2478.  
  2479.        Ordinarily, project  files  should  be  created  with  the
  2480.        -library  flag  in  effect.  In this mode, the information
  2481.        saved in the project file consists of all subprogram  dec-
  2482.        larations, all subprogram invocations not resolved by dec-
  2483.        larations in the same file, and one instance of each  COM-
  2484.        MON  block  declaration.   This  is  the minimum amount of
  2485.        information needed to check agreement between files.
  2486.  
  2487.        If the file contains more than one routine, there are some
  2488.        possible problems that can arise from creating the project
  2489.        file in library mode, because the calling hierarchy  among
  2490.        routines  defined  within  the file is lost.  Also, if the
  2491.        routines in the file make use of COMMON  blocks  that  are
  2492.        shared  with  routines  in  other files, there will not be
  2493.        enough information saved for the correct checking  of  set
  2494.        and  used  status  of  COMMON  blocks and COMMON variables
  2495.        according to the -usage setting.  Therefore if you plan to
  2496.        use  project  files  when  the  -usage  setting is nonzero
  2497.        (which is the default situation), and if multiple routines
  2498.        in  one  project file share COMMON blocks with routines in
  2499.        other files, the project files should be created with  the
  2500.        -library  flag  turned  off.  In this mode, ftnchek saves,
  2501.        besides the information listed above,  one  invocation  of
  2502.        each  subprogram by any other subprogram in the same file,
  2503.  
  2504.  
  2505.  
  2506.                             4 Apr 1996                         38
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2513.  
  2514.  
  2515.        and all COMMON block declarations.  This  means  that  the
  2516.        project  file will be larger than necessary, and that when
  2517.        it is read in, ftnchek may repeat some inter-module checks
  2518.        that it already did when the project file was created.  If
  2519.        each project file contains only one module,  there  is  no
  2520.        loss  of  information  in  creating  the  project files in
  2521.        library mode.
  2522.  
  2523.        Because of the possible loss of  information  entailed  by
  2524.        creating  a project file with the -library flag in effect,
  2525.        whenever that project file is read in later,  it  will  be
  2526.        treated  as  a library file regardless of the current set-
  2527.        ting of the -library flag.  On the other hand,  a  project
  2528.        file  created  with library mode turned off can be read in
  2529.        later in either mode.
  2530.  
  2531.  
  2532.        Here is an example of how to use the UNIX make utility  to
  2533.        automatically create a new project file each time the cor-
  2534.        responding source file is altered, and to check the set of
  2535.        files  for  consistency.  The example assumes that a macro
  2536.        OBJS has been defined which lists all the names of  object
  2537.        files  to  be  linked  together  to form the complete exe-
  2538.        cutable program.
  2539.  
  2540.            # tell make what a project file suffix is
  2541.            .SUFFIXES: .prj
  2542.  
  2543.            # tell make how to create a .prj file from a .f file
  2544.            .f.prj:
  2545.                    ftnchek -project -noextern -library $<
  2546.  
  2547.            # set up macro PRJS containing project filenames
  2548.            PRJS= $(OBJS:.o=.prj)
  2549.  
  2550.            # "make check" will check everything that has been changed.
  2551.            check: $(PRJS)
  2552.                    ftnchek $(PRJS)
  2553.  
  2554.  
  2555.  
  2556. AN EXAMPLE
  2557.        The following simple Fortran program illustrates the  mes-
  2558.        sages given by ftnchek.  The program is intended to accept
  2559.        an array of test scores and then compute the  average  for
  2560.        the series.
  2561.  
  2562.  
  2563.        C       AUTHORS: MIKE MYERS AND LUCIA SPAGNUOLO
  2564.        C       DATE:    MAY 8, 1989
  2565.  
  2566.        C       Variables:
  2567.        C               SCORE -> an array of test scores
  2568.        C               SUM ->   sum of the test scores
  2569.  
  2570.  
  2571.  
  2572.                             4 Apr 1996                         39
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2579.  
  2580.  
  2581.        C               COUNT -> counter of scores read in
  2582.        C               I ->     loop counter
  2583.  
  2584.                REAL FUNCTION COMPAV(SCORE,COUNT)
  2585.                    INTEGER SUM,COUNT,J,SCORE(5)
  2586.  
  2587.                    DO 30 I = 1,COUNT
  2588.                        SUM = SUM + SCORE(I)
  2589.        30          CONTINUE
  2590.                    COMPAV = SUM/COUNT
  2591.                END
  2592.  
  2593.  
  2594.                PROGRAM AVENUM
  2595.        C
  2596.        C                       MAIN PROGRAM
  2597.        C
  2598.        C       AUTHOR:   LOIS BIGBIE
  2599.        C       DATE:     MAY 15, 1990
  2600.        C
  2601.        C       Variables:
  2602.        C               MAXNOS -> maximum number of input values
  2603.        C               NUMS    -> an array of numbers
  2604.        C               COUNT   -> exact number of input values
  2605.        C               AVG     -> average returned by COMPAV
  2606.        C               I       -> loop counter
  2607.        C
  2608.  
  2609.                    PARAMETER(MAXNOS=5)
  2610.                    INTEGER I, COUNT
  2611.                    REAL NUMS(MAXNOS), AVG
  2612.                    COUNT = 0
  2613.                    DO 80 I = 1,MAXNOS
  2614.                        READ (5,*,END=100) NUMS(I)
  2615.                        COUNT = COUNT + 1
  2616.        80          CONTINUE
  2617.        100         AVG = COMPAV(NUMS, COUNT)
  2618.                END
  2619.  
  2620.  
  2621.        The  compiler gives no error messages when this program is
  2622.        compiled.  Yet here is what happens when it is run:
  2623.  
  2624.  
  2625.        $ run average
  2626.        70
  2627.        90
  2628.        85
  2629.        <EOF>
  2630.        $
  2631.  
  2632.  
  2633.        What happened?  Why didn't the program do  anything?   The
  2634.        following  is  the  output from ftnchek when it is used to
  2635.  
  2636.  
  2637.  
  2638.                             4 Apr 1996                         40
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2645.  
  2646.  
  2647.        debug the above program:
  2648.  
  2649.  
  2650.  
  2651.  
  2652.        $ ftnchek -list -symtab average
  2653.  
  2654.        FTNCHEK Version 2.9 April 1996
  2655.  
  2656.        File average.f:
  2657.  
  2658.              1 C       AUTHORS: MIKE MYERS AND LUCIA SPAGNUOLO
  2659.              2 C       DATE:    MAY 8, 1989
  2660.              3
  2661.              4 C       Variables:
  2662.              5 C               SCORE -> an array of test scores
  2663.              6 C               SUM ->   sum of the test scores
  2664.              7 C               COUNT -> counter of scores read in
  2665.              8 C               I ->     loop counter
  2666.              9
  2667.             10         REAL FUNCTION COMPAV(SCORE,COUNT)
  2668.             11             INTEGER SUM,COUNT,J,SCORE(5)
  2669.             12
  2670.             13             DO 30 I = 1,COUNT
  2671.             14                 SUM = SUM + SCORE(I)
  2672.             15 30          CONTINUE
  2673.             16             COMPAV = SUM/COUNT
  2674.                                   ^
  2675.        Warning near line 16 col 20: integer quotient expr converted to real
  2676.             17         END
  2677.             18
  2678.  
  2679.        Module COMPAV: func: real
  2680.  
  2681.        Variables:
  2682.  
  2683.              Name Type Dims     Name Type Dims     Name Type Dims     Name Type Dims
  2684.            COMPAV real         COUNT intg             I intg*            J intg
  2685.             SCORE intg  1        SUM intg
  2686.  
  2687.        * Variable not declared. Type has been implicitly defined.
  2688.  
  2689.  
  2690.        Warning: Variables declared but never referenced:
  2691.                 J
  2692.  
  2693.        Warning: Variables may be used before set:
  2694.               SUM
  2695.  
  2696.  
  2697.             19
  2698.             20         PROGRAM AVENUM
  2699.             21 C
  2700.             22 C                       MAIN PROGRAM
  2701.  
  2702.  
  2703.  
  2704.                             4 Apr 1996                         41
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2711.  
  2712.  
  2713.             23 C
  2714.             24 C       AUTHOR:   LOIS BIGBIE
  2715.             25 C       DATE:     MAY 15, 1990
  2716.             26 C
  2717.             27 C       Variables:
  2718.             28 C               MAXNOS -> maximum number of input values
  2719.             29 C               NUMS    -> an array of numbers
  2720.             30 C               COUNT   -> exact number of input values
  2721.             31 C               AVG     -> average returned by COMPAV
  2722.             32 C               I       -> loop counter
  2723.             33 C
  2724.             34
  2725.             35             PARAMETER(MAXNOS=5)
  2726.             36             INTEGER I, COUNT
  2727.             37             REAL NUMS(MAXNOS), AVG
  2728.             38             COUNT = 0
  2729.             39             DO 80 I = 1,MAXNOS
  2730.             40                 READ (5,*,END=100) NUMS(I)
  2731.             41                 COUNT = COUNT + 1
  2732.             42 80          CONTINUE
  2733.             43 100         AVG = COMPAV(NUMS, COUNT)
  2734.             44         END
  2735.  
  2736.        Module AVENUM: prog
  2737.  
  2738.        External subprograms referenced:
  2739.  
  2740.            COMPAV: real*
  2741.  
  2742.        Variables:
  2743.  
  2744.              Name Type Dims     Name Type Dims     Name Type Dims     Name Type Dims
  2745.               AVG real         COUNT intg             I intg        MAXNOS intg*
  2746.              NUMS real  1
  2747.  
  2748.        * Variable not declared. Type has been implicitly defined.
  2749.  
  2750.  
  2751.        Warning: Variables set but never used:
  2752.               AVG
  2753.  
  2754.  
  2755.  
  2756.         0 syntax errors detected in file average.f
  2757.         6 warnings issued in file average.f
  2758.  
  2759.        Subprogram COMPAV:  argument data type mismatch
  2760.          at position 1:
  2761.            Dummy arg SCORE is type intg  in module COMPAV line 10 file average.f
  2762.            Actual arg NUMS is type real  in module AVENUM line 43 file average.f
  2763.  
  2764.  
  2765.        According to ftnchek, the program contains variables which
  2766.        may be used before they are assigned an initial value, and
  2767.  
  2768.  
  2769.  
  2770.                             4 Apr 1996                         42
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2777.  
  2778.  
  2779.        variables which are not needed.  ftnchek  also  warns  the
  2780.        user  that  an  integer  quotient  has been converted to a
  2781.        real. This may assist the user in catching  an  unintended
  2782.        roundoff error.  Since the -symtab flag was given, ftnchek
  2783.        prints out a table containing identifiers from  the  local
  2784.        module  and  their  corresponding  datatype  and number of
  2785.        dimensions.  Finally, ftnchek warns that the function COM-
  2786.        PAV is not used with the proper type of arguments.
  2787.  
  2788.        With ftnchek's help, we can debug the program.  We can see
  2789.        that there were the following errors:
  2790.  
  2791.        1.  SUM and COUNT  should  have  been  converted  to  real
  2792.            before doing the division.
  2793.  
  2794.        2.  SUM  should have been initialized to 0 before entering
  2795.            the loop.
  2796.  
  2797.        3.  AVG was never printed out after being calculated.
  2798.  
  2799.        4.  NUMS should have  been  declared  INTEGER  instead  of
  2800.            REAL.
  2801.  
  2802.        We also see that I, not J, should have been declared INTE-
  2803.        GER in function COMPAV. Also, MAXNOS was not  declared  as
  2804.        INTEGER, nor COMPAV as REAL, in program AVENUM.  These are
  2805.        not errors, but they may  indicate  carelessness.   As  it
  2806.        happened,  the  default  type of these variables coincided
  2807.        with the intended type.
  2808.  
  2809.        Here is the corrected program, and its output when run:
  2810.  
  2811.  
  2812.        C       AUTHORS: MIKE MYERS AND LUCIA SPAGNUOLO
  2813.        C       DATE:    MAY 8, 1989
  2814.        C
  2815.        C       Variables:
  2816.        C               SCORE -> an array of test scores
  2817.        C               SUM ->   sum of the test scores
  2818.        C               COUNT -> counter of scores read in
  2819.        C               I ->     loop counter
  2820.        C
  2821.               REAL FUNCTION COMPAV(SCORE,COUNT)
  2822.                    INTEGER SUM,COUNT,I,SCORE(5)
  2823.        C
  2824.                    SUM = 0
  2825.                    DO 30 I = 1,COUNT
  2826.                        SUM = SUM + SCORE(I)
  2827.        30          CONTINUE
  2828.                    COMPAV = FLOAT(SUM)/FLOAT(COUNT)
  2829.                END
  2830.        C
  2831.        C
  2832.                PROGRAM AVENUM
  2833.  
  2834.  
  2835.  
  2836.                             4 Apr 1996                         43
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2843.  
  2844.  
  2845.        C
  2846.        C                       MAIN PROGRAM
  2847.        C
  2848.        C       AUTHOR:   LOIS BIGBIE
  2849.        C       DATE:     MAY 15, 1990
  2850.        C
  2851.        C       Variables:
  2852.        C               MAXNOS -> maximum number of input values
  2853.        C               NUMS    -> an array of numbers
  2854.        C               COUNT   -> exact number of input values
  2855.        C               AVG     -> average returned by COMPAV
  2856.        C               I       -> loop counter
  2857.        C
  2858.        C
  2859.                    INTEGER MAXNOS
  2860.                    PARAMETER(MAXNOS=5)
  2861.                    INTEGER I, NUMS(MAXNOS), COUNT
  2862.                    REAL AVG,COMPAV
  2863.                    COUNT = 0
  2864.                    DO 80 I = 1,MAXNOS
  2865.                        READ (5,*,END=100) NUMS(I)
  2866.                        COUNT = COUNT + 1
  2867.        80          CONTINUE
  2868.        100         AVG = COMPAV(NUMS, COUNT)
  2869.                    WRITE(6,*) 'AVERAGE =',AVG
  2870.                END
  2871.        $ run average
  2872.        70
  2873.        90
  2874.        85
  2875.        <EOF>
  2876.        AVERAGE =   81.66666
  2877.        $
  2878.  
  2879.  
  2880.        With ftnchek's help, our program is a success!
  2881.  
  2882.  
  2883. INTERPRETING THE OUTPUT
  2884.        The messages given by  ftnchek  include  not  only  syntax
  2885.        errors  but also warnings and informational messages about
  2886.        things that are legal Fortran but that may indicate errors
  2887.        or carelessness.  Most of these messages can be turned off
  2888.        by command-line options.  Which option controls each  mes-
  2889.        sage  depends  on the nature of the condition being warned
  2890.        about.  See the descriptions of the command-line flags  in
  2891.        the  previous  sections, and of individual messages below.
  2892.        Each message is prefixed with a word or phrase  indicating
  2893.        the nature of the condition and its severity.
  2894.  
  2895.        ``Error'' means a syntax error.  The simplest kind of syn-
  2896.        tax errors are typographical errors,  for  example  unbal-
  2897.        anced  parentheses or misspelling of a keyword.  This type
  2898.        of error is caught by the  parser  and  appears  with  the
  2899.  
  2900.  
  2901.  
  2902.                             4 Apr 1996                         44
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2909.  
  2910.  
  2911.        description ``parse error'' or ``syntax error'' (depending
  2912.        on whether the parser was built using GNU  bison  or  UNIX
  2913.        yacc  respectively).  This type of error message cannot be
  2914.        suppressed.  Be aware that this type of error often  means
  2915.        that  ftnchek  has  not properly interpreted the statement
  2916.        where the error occurs, so that  its  subsequent  checking
  2917.        operations  will be compromised.  You should eliminate all
  2918.        syntax errors before proceeding  to  interpret  the  other
  2919.        messages ftnchek gives.
  2920.  
  2921.        ``Warning:  Nonstandard syntax'' indicates an extension to
  2922.        Fortran that ftnchek supports but that is not according to
  2923.        the  Fortran  77  Standard.   The  extensions that ftnchek
  2924.        accepts are described in the section on Extensions  below.
  2925.        One  example  is the DO ... ENDDO construction.  If a pro-
  2926.        gram uses these extensions, warnings will be given accord-
  2927.        ing to specifications under the -f77 setting.  The default
  2928.        behavior is to give no warnings.
  2929.  
  2930.        ``Warning'' in other cases means a condition that is  sus-
  2931.        picious  but  that  may or may not be a programming error.
  2932.        Frequently these conditions are legal under the  standard.
  2933.        Some are illegal but do not fall under the heading of syn-
  2934.        tax errors.  Usage errors are one example.  These refer to
  2935.        the  possibility that a variable may be used before it has
  2936.        been assigned a value (generally  an  error),  or  that  a
  2937.        variable  is  declared  but  never  used (harmless but may
  2938.        indicate carelessness).  The amount of checking for  usage
  2939.        errors  is controlled by the -usage flag, which is set for
  2940.        the maximum amount of checking by default.
  2941.  
  2942.        Truncation warnings cover situations in which accuracy may
  2943.        be  lost unintentionally, for example when a double preci-
  2944.        sion value is assigned to a real variable.  These warnings
  2945.        are  controlled by the -truncation setting, which is on by
  2946.        default.
  2947.  
  2948.        ``Nonportable usage'' warns about some  feature  that  may
  2949.        not  be  accepted  by some compilers even though it is not
  2950.        contrary to the Fortran 77 Standard, or that may cause the
  2951.        program  to  perform  differently  on different platforms.
  2952.        For example, equivalencing real and integer  variables  is
  2953.        usually a non-portable practice.  The use of extensions to
  2954.        the standard language is, of  course,  another  source  of
  2955.        non-portability,  but  this is handled as a separate case.
  2956.        To check a program for true portability, both the  -porta-
  2957.        bility  and  the -f77 flags should be used.  They are both
  2958.        turned off by default.  The -wordsize setting is  provided
  2959.        to  check  only  those nonportable usages that depend on a
  2960.        particular machine wordsize.
  2961.  
  2962.        ``Possibly misleading appearance'' is used for legal  con-
  2963.        structions  that  may not mean what they appear to mean at
  2964.        first glance.  For  example,  Fortran  is  insensitive  to
  2965.  
  2966.  
  2967.  
  2968.                             4 Apr 1996                         45
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  2975.  
  2976.  
  2977.        blank  space, so extraneous space within variable names or
  2978.        the lack of space between a keyword  and  a  variable  can
  2979.        convey the wrong impression to the reader.  These messages
  2980.        can be suppressed by turning off the -pretty  flag,  which
  2981.        is on by default.
  2982.  
  2983.        Other messages that are given after all the files are pro-
  2984.        cessed, and having to do with agreement  between  modules,
  2985.        do  not  use  the word ``warning'' but generally fall into
  2986.        that category.  Examples include type  mismatches  between
  2987.        corresponding variables in different COMMON block declara-
  2988.        tions, or between dummy and actual arguments of a  subpro-
  2989.        gram.   These  warnings  are controlled by the -common and
  2990.        -arguments settings respectively.  By default both are set
  2991.        for maximum strictness of checking.
  2992.  
  2993.        Another  group of warnings about conditions that are often
  2994.        harmless refer to cases where the array  properties  of  a
  2995.        variable  passed  as  a subprogram argument differ between
  2996.        the two routines.  For instance, an array element might be
  2997.        passed  to  a subroutine that expects a whole array.  This
  2998.        is a commonly-used technique for processing single rows or
  2999.        columns of two-dimensional arrays.  However, it could also
  3000.        indicate a programming error.  The -array  setting  allows
  3001.        the  user to adjust the degree of strictness to be used in
  3002.        checking this kind of agreement between actual  and  dummy
  3003.        array arguments.  By default the strictness is maximum.
  3004.  
  3005.        ``Oops''  indicates  a technical problem, meaning either a
  3006.        bug in ftnchek or that its resources have been exceeded.
  3007.  
  3008.        The syntax error messages and warnings include  the  file-
  3009.        name  along  with  the  line  number  and  column  number.
  3010.        ftnchek has two different options for  the  appearance  of
  3011.        these  error  messages.  If -novice is in effect, which is
  3012.        the default, the messages are  in  a  style  approximating
  3013.        normal  English.   (In  default style, the filename is not
  3014.        printed in messages within the  body  of  the  program  if
  3015.        -list is in effect.)  The other style of error messages is
  3016.        selected by the -nonovice  option.   In  this  style,  the
  3017.        appearance  of the messages is similar to that of the UNIX
  3018.        lint program.
  3019.  
  3020.        ftnchek is still blind to some  kinds  of  syntax  errors.
  3021.        The  two most important ones are detailed checking of FOR-
  3022.        MAT statements, and almost anything to do with control  of
  3023.        execution  flow  by  means of IF, DO, and GOTO statements:
  3024.        namely correct nesting of control structures, matching  of
  3025.        opening statements such as IF ... THEN with closing state-
  3026.        ments such as ENDIF,  and  the  proper  use  of  statement
  3027.        labels (numbers).  Most compilers will catch these errors.
  3028.        See the section on Limitations for a more detailed discus-
  3029.        sion.
  3030.  
  3031.  
  3032.  
  3033.  
  3034.                             4 Apr 1996                         46
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3041.  
  3042.  
  3043.        If  ftnchek gives you a syntax error message when the com-
  3044.        piler does not, it may be because your program contains an
  3045.        extension  to  standard  Fortran  which is accepted by the
  3046.        compiler but not by ftnchek.  (See the section  on  Exten-
  3047.        sions.)   On  a  VAX/VMS  system, you can use the compiler
  3048.        option /STANDARD to cause  the  compiler  to  accept  only
  3049.        standard Fortran.  On most UNIX or UNIX-like systems, this
  3050.        can be accomplished by setting the flag -ansi.
  3051.  
  3052.        Many of the messages given by  ftnchek  are  self-explana-
  3053.        tory.   Those  that  need  some additional explanation are
  3054.        listed below in alphabetical order.
  3055.  
  3056.        Common block NAME: data type mismatch at position n
  3057.               The n-th variable in the COMMON  block  differs  in
  3058.               data type in two different declarations of the COM-
  3059.               MON block.  By default  (-common  strictness  level
  3060.               3),  ftnchek is very picky about COMMON blocks: the
  3061.               variables listed in them must match exactly by data
  3062.               type and array dimensions.  That is, the legal pair
  3063.               of declarations in different modules:
  3064.                    COMMON /COM1/ A,B
  3065.               and
  3066.                    COMMON /COM1/ A(2)
  3067.  
  3068.               will cause ftnchek to give warnings  at  strictness
  3069.               level  3.  These two declarations are legal in For-
  3070.               tran since they both declare  two  real  variables.
  3071.               At  strictness  level  1  or 2, no warning would be
  3072.               given in this example, but  the  warning  would  be
  3073.               given  if  there  were  a  data  type mismatch, for
  3074.               instance, if B were declared  INTEGER.   Controlled
  3075.               by -common setting.
  3076.  
  3077.  
  3078.        Common block NAME has long data type following short data
  3079.               type
  3080.               Some  compilers  require  alignment  of  multi-byte
  3081.               items  so  that each item begins at an address that
  3082.               is a multiple of the item size.  Thus  if  a  short
  3083.               (e.g.  single-precision real) item is followed by a
  3084.               long (e.g.  double precision real) item, the latter
  3085.               may   not  be  aligned  correctly.   Controlled  by
  3086.               -portability=common-alignment option.
  3087.  
  3088.  
  3089.        Common block NAME has mixed character and non-character
  3090.               variables
  3091.               The ANSI standard requires that if any variable  in
  3092.               a COMMON block is of type CHARACTER, then all other
  3093.               variables in the same COMMON block must also be  of
  3094.               type  CHARACTER.   Controlled  by -f77=mixed-common
  3095.               option.
  3096.  
  3097.  
  3098.  
  3099.  
  3100.                             4 Apr 1996                         47
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3107.  
  3108.  
  3109.        Common block NAME: varying length
  3110.               For -common setting level  2,  this  message  means
  3111.               that  a  COMMON block is declared to have different
  3112.               numbers of words in two different  subprograms.   A
  3113.               word is the amount of storage occupied by one inte-
  3114.               ger or real variable.  For -common setting level 3,
  3115.               it  means  that the two declarations have different
  3116.               numbers of variables, where an array of any size is
  3117.               considered  one  variable.  This is not necessarily
  3118.               an error, but it may indicate that  a  variable  is
  3119.               missing from one of the lists.  Note that according
  3120.               to the Fortran 77 Standard,  it  is  an  error  for
  3121.               named  COMMON blocks (but not blank COMMON) to dif-
  3122.               fer in number of words in declarations in different
  3123.               modules.  Given for -common setting 2 or 3.
  3124.  
  3125.  
  3126.        Error: Badly formed logical/relational operator or con-
  3127.               stant
  3128.  
  3129.        Error: Badly formed real constant
  3130.               The syntax analyzer has found the start of  one  of
  3131.               the  special words that begin and end with a period
  3132.               (e.g. .EQ.), or the start of  a  numeric  constant,
  3133.               but  did  not succeed in finding a complete item of
  3134.               that kind.
  3135.  
  3136.  
  3137.        Error: cannot be adjustable size in module NAME
  3138.               A character variable cannot be declared with a size
  3139.               that  is  an asterisk in parentheses unless it is a
  3140.               dummy argument, a parameter, or  the  name  of  the
  3141.               function defined in the module.
  3142.  
  3143.  
  3144.        Error: cannot be declared in SAVE statement in module NAME
  3145.               Only local  variables  and  common  blocks  can  be
  3146.               declared in a SAVE statement.
  3147.  
  3148.  
  3149.        Error: No path to this statement
  3150.               ftnchek will detect statements which are ignored or
  3151.               by-passed because there is no foreseeable route  to
  3152.               the  statement.   For example, an unnumbered state-
  3153.               ment  (a  statement  without  a  statement  label),
  3154.               occurring  immediately after a GOTO statement, can-
  3155.               not possibly be executed.
  3156.  
  3157.  
  3158.        Error: Parse error
  3159.               This means that the parser, which analyzes the For-
  3160.               tran  program  into  expressions, statements, etc.,
  3161.               has been unable to find a valid interpretation  for
  3162.               some  portion  of  a  statement in the program.  If
  3163.  
  3164.  
  3165.  
  3166.                             4 Apr 1996                         48
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3173.  
  3174.  
  3175.               your compiler does not report a syntax error at the
  3176.               same  place,  the most common explanations are: (1)
  3177.               use of an extension to ANSI standard  Fortran  that
  3178.               is  not recognized by ftnchek, or (2) the statement
  3179.               requires more lookahead than ftnchek uses (see sec-
  3180.               tion on Bugs).
  3181.  
  3182.               NOTE:  This  message means that the affected state-
  3183.               ment is not interpreted.  Therefore, it is possible
  3184.               that  ftnchek's  subsequent  processing  will be in
  3185.               error, if it depends on  any  matters  affected  by
  3186.               this statement (type declarations, etc.).
  3187.  
  3188.  
  3189.        Error: Syntax error
  3190.               This  is  the  same  as ``Error: Parse error'' (see
  3191.               above).  It is generated if your version of ftnchek
  3192.               was  built  using  the  UNIX  yacc parser generator
  3193.               rather than GNU bison.
  3194.  
  3195.  
  3196.        Identifiers which are not unique in first six chars
  3197.               Warns that two identifiers which are longer than  6
  3198.               characters do not differ in the first 6 characters.
  3199.               This is for portability: they may not be considered
  3200.               distinct by some compilers.  Controlled by -sixchar
  3201.               option.
  3202.  
  3203.  
  3204.        Nonportable usage: argument precision  may  not  be
  3205.               correct  for intrinsic function
  3206.               The precision of an argument passed to an intrinsic
  3207.               function   may  be  incorrect  on  some  computers.
  3208.               Issued  when  a  numeric  variable  declared   with
  3209.               explicit  precision (e.g.  REAL*8 X) is passed to a
  3210.               specific intrinsic function (e.g. DSQRT(X)).   Con-
  3211.               trolled by -portability=mixed-size and -wordsize.
  3212.  
  3213.  
  3214.        Nonportable usage: character constant/variable length
  3215.               exceeds 255
  3216.               Some  compilers  do  not  support character strings
  3217.               more than 255 characters in length.  Controlled  by
  3218.               -portability=long-string.
  3219.  
  3220.  
  3221.        Nonportable usage: File contains tabs
  3222.               ftnchek  expands tabs to be equivalent to spaces up
  3223.               to the next column which is a multiple of 8.   Some
  3224.               compilers  treat  tabs  differently, and also it is
  3225.               possible that files sent by  electronic  mail  will
  3226.               have  the  tabs  converted  to  blanks in some way.
  3227.               Therefore files containing tabs may not be compiled
  3228.               correctly  after  being  transferred.  ftnchek does
  3229.  
  3230.  
  3231.  
  3232.                             4 Apr 1996                         49
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3239.  
  3240.  
  3241.               not give this message if  tabs  only  occur  within
  3242.               comments  or  character  constants.   Controlled by
  3243.               -portability=tab.
  3244.  
  3245.  
  3246.        Nonportable usage: non-integer DO loop bounds
  3247.               This warning is only given when the  DO  index  and
  3248.               bounds are non-integer.  Use of non-integer quanti-
  3249.               ties in a DO statement may cause unexpected errors,
  3250.               or  different results on different machines, due to
  3251.               roundoff   effects.    Controlled   by   -portabil-
  3252.               ity=real-do.
  3253.  
  3254.  
  3255.        Possibly it is an array which was not declared
  3256.               This  message  is appended to warnings related to a
  3257.               function invocation or to  an  argument  type  mis-
  3258.               match,  for  which the possibility exists that what
  3259.               appears to be a function is actually meant to be an
  3260.               array.   If  the  programmer forgot to dimension an
  3261.               array, references to the array will be  interpreted
  3262.               as function invocations.  This message will be sup-
  3263.               pressed if the  name  in  question  appears  in  an
  3264.               EXTERNAL or INTRINSIC statement.  Controlled by the
  3265.               -novice option.
  3266.  
  3267.  
  3268.        Possibly misleading appearance: characters past 72 columns
  3269.               The  program  is being processed with the statement
  3270.               field width at its standard value of 72,  and  some
  3271.               nonblank characters have been found past column 72.
  3272.               In this case, ftnchek is not processing the charac-
  3273.               ters past column 72, and is notifying the user that
  3274.               the statement may not  have  the  meaning  that  it
  3275.               appears   to   have.   These  characters  might  be
  3276.               intended by the programmer to be  significant,  but
  3277.               they  will  be ignored by the compiler.  Controlled
  3278.               by -pretty=long-line.
  3279.  
  3280.  
  3281.        Possibly misleading appearance: Common  block  declared
  3282.               in  more than one statement
  3283.               Such multiple declarations are legal and  have  the
  3284.               same  effect as a continuation of the original dec-
  3285.               laration of the block.  This warning is only  given
  3286.               if  the  two  declarations  are separated by one or
  3287.               more   intervening   statements.    Controlled   by
  3288.               -pretty=multiple-common.
  3289.  
  3290.  
  3291.        Possibly  misleading  appearance: Continuation follows
  3292.               comment or blank line
  3293.               ftnchek  issues  this  warning message to alert the
  3294.               user  that  a  continuation  of  a   statement   is
  3295.  
  3296.  
  3297.  
  3298.                             4 Apr 1996                         50
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3305.  
  3306.  
  3307.               interspersed with comments, making it easy to over-
  3308.               look.  Controlled by -pretty=continuation.
  3309.  
  3310.  
  3311.        Possibly misleading appearance: Extraneous parentheses
  3312.               Warns about parentheses surrounding a  variable  by
  3313.               itself  in  an  expression.   When  a parenthesized
  3314.               variable is passed as an argument to a  subprogram,
  3315.               it  is  treated as an expression, not as a variable
  3316.               whose value can be modified by the called  routine.
  3317.               Controlled by -pretty=parentheses.
  3318.  
  3319.  
  3320.        Subprogram NAME: argument data type mismatch at position n
  3321.               The subprogram's n-th actual argument (in the  CALL
  3322.               or  the usage of a function) differs in datatype or
  3323.               precision from the n-th dummy argument (in the SUB-
  3324.               ROUTINE or FUNCTION declaration).  For instance, if
  3325.               the user defines a subprogram by
  3326.                    SUBROUTINE SUBA(X)
  3327.                    REAL X
  3328.               and elsewhere invokes SUBA by
  3329.                    CALL SUBA(2)
  3330.  
  3331.               ftnchek will detect the error.  The reason here  is
  3332.               that  the  number 2 is integer, not real.  The user
  3333.               should have written
  3334.                    CALL SUBA(2.0)
  3335.  
  3336.               When checking an argument which  is  a  subprogram,
  3337.               ftnchek  must  be able to determine whether it is a
  3338.               function  or  a  subroutine.   The  rules  used  by
  3339.               ftnchek  to  do this are as follows: If the subpro-
  3340.               gram, besides being passed as an  actual  argument,
  3341.               is also invoked directly elsewhere in the same mod-
  3342.               ule, then its type is determined by that usage.  If
  3343.               not,  then  if  the name of the subprogram does not
  3344.               appear in  an  explicit  type  declaration,  it  is
  3345.               assumed  to  be  a  subroutine; if it is explicitly
  3346.               typed it is taken as a function.   Therefore,  sub-
  3347.               routines  passed  as  actual arguments need only be
  3348.               declared by an EXTERNAL statement  in  the  calling
  3349.               module,  whereas  functions must also be explicitly
  3350.               typed in order to avoid generating this error  mes-
  3351.               sage.  Controlled by -arguments setting.
  3352.  
  3353.  
  3354.        Subprogram NAME: argument arrayness mismatch at position n
  3355.               Similar to the preceding situation, but the subpro-
  3356.               gram  dummy argument differs from the corresponding
  3357.               actual argument in its number of dimensions or num-
  3358.               ber  of  elements.   Controlled  by -array together
  3359.               with -arguments settings.
  3360.  
  3361.  
  3362.  
  3363.  
  3364.                             4 Apr 1996                         51
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3371.  
  3372.  
  3373.        Subprogram NAME: argument mismatch at position n
  3374.               A character dummy argument is larger than the  cor-
  3375.               responding  actual  argument,  or a Hollerith dummy
  3376.               argument is larger than  the  corresponding  actual
  3377.               argument.  Controlled by -arguments setting.
  3378.  
  3379.  
  3380.        Subprogram NAME: argument usage mismatch
  3381.               ftnchek detects a possible conflict between the way
  3382.               a subprogram uses an argument and the way in  which
  3383.               the  argument  is  supplied to the subprogram.  The
  3384.               conflict can be  one  of  two  types,  as  outlined
  3385.               below.
  3386.  
  3387.  
  3388.           Dummy arg is modified, Actual arg is const or expr
  3389.               A  dummy argument is an argument as named in a SUB-
  3390.               ROUTINE or FUNCTION statement and used  within  the
  3391.               subprogram.   An  actual argument is an argument as
  3392.               passed to a subroutine or function by  the  caller.
  3393.               ftnchek is saying that a dummy argument is modified
  3394.               by the  subprogram,  implying  that  its  value  is
  3395.               changed  in  the calling module.  The corresponding
  3396.               actual argument should not be a constant or expres-
  3397.               sion,  but rather a variable or array element which
  3398.               can be legitimately assigned to.  Given for  -usage
  3399.               setting (one's digit) 1 or 3.
  3400.  
  3401.  
  3402.           Dummy arg used before set, Actual arg not set
  3403.               Here a dummy argument may be used in the subprogram
  3404.               before having a value assigned to it by the subpro-
  3405.               gram.   The  corresponding  actual  argument should
  3406.               have a value assigned to it by the caller prior  to
  3407.               invoking  the subprogram.  Given for -usage setting
  3408.               (one's digit) 1 or 3.
  3409.  
  3410.               These warnings are not affected by  the  -arguments
  3411.               setting.
  3412.  
  3413.  
  3414.        Subprogram NAME invoked inconsistently
  3415.               Here  the  mismatch  is between the datatype of the
  3416.               subprogram itself  as  used  and  as  defined.  For
  3417.               instance, if the user declares
  3418.                    INTEGER FUNCTION COUNT(A)
  3419.               and invokes COUNT in another module as
  3420.                    N = COUNT(A)
  3421.  
  3422.               without  declaring its datatype, it will default to
  3423.               real type, based on the first letter of  its  name.
  3424.               The  calling module should have included the decla-
  3425.               ration
  3426.                    INTEGER COUNT
  3427.  
  3428.  
  3429.  
  3430.                             4 Apr 1996                         52
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3437.  
  3438.  
  3439.               Given for -arguments setting 2 or 3.
  3440.  
  3441.  
  3442.        Subprogram NAME:  varying length argument lists:
  3443.               An inconsistency has been found between the  number
  3444.               of  dummy  arguments  (parameters) a subprogram has
  3445.               and the number of actual arguments given it  in  an
  3446.               invocation.  ftnchek keeps track of all invocations
  3447.               of subprograms  (CALL  statements  and  expressions
  3448.               using functions) and compares them with the defini-
  3449.               tions of the subprograms elsewhere  in  the  source
  3450.               code.  The Fortran compiler normally does not catch
  3451.               this type of error.  Given for -arguments setting 1
  3452.               or 3.
  3453.  
  3454.  
  3455.        Variable not declared.  Type has been implicitly defined
  3456.               When  printing  the  symbol  table  for  a  module,
  3457.               ftnchek will flag with an asterisk all  identifiers
  3458.               that  are  not  explicitly  typed and will show the
  3459.               datatype that was assigned through implicit typing.
  3460.               This provides support for users who wish to declare
  3461.               all variables as is  required  in  Pascal  or  some
  3462.               other  languages.   This  message appears only when
  3463.               the -symtab option is  in  effect.   Alternatively,
  3464.               use  the -declare flag if you want to get a list of
  3465.               all undeclared variables.
  3466.  
  3467.  
  3468.        Variables declared but never referenced
  3469.               Detects any identifiers that were declared in  your
  3470.               program  but were never used, either to be assigned
  3471.               a value or to have their value accessed.  Variables
  3472.               in  COMMON  are excluded.  Given for -usage setting
  3473.               (one's digit) 2 or 3.
  3474.  
  3475.  
  3476.        Variables set but never used
  3477.               ftnchek will notify the user when  a  variable  has
  3478.               been assigned a value, but the variable is not oth-
  3479.               erwise used in the program.  Usually  this  results
  3480.               from an oversight.  Given for -usage setting (one's
  3481.               digit) 2 or 3.
  3482.  
  3483.  
  3484.        Variables used before set
  3485.               This message indicates that an identifier  is  used
  3486.               to  compute  a  value  prior to its initialization.
  3487.               Such usage may lead to  an  incorrect  value  being
  3488.               computed,  since  its  initial  value  is  not con-
  3489.               trolled.  Given for -usage setting (one's digit)  1
  3490.               or 3.
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.                             4 Apr 1996                         53
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3503.  
  3504.  
  3505.        Variables may be used before set
  3506.               Similar  to  used before set except that ftnchek is
  3507.               not able to determine its  status  with  certainty.
  3508.               ftnchek  assumes  a variable may be used before set
  3509.               if the first usage of the variable occurs prior  in
  3510.               the  program  text  to  its  assignment.  Given for
  3511.               -usage setting (one's digit) 1 or 3.
  3512.  
  3513.  
  3514.        Warning: DO index is not integer
  3515.               This warning is only given when the DO  bounds  are
  3516.               integer,  but the DO index is not.  It may indicate
  3517.               a failure to declare the index to  be  an  integer.
  3518.               Controlled by -truncation=real-do option.
  3519.  
  3520.  
  3521.        Warning: integer quotient expr converted to real
  3522.               The  quotient of two integers results in an integer
  3523.               type  result,  in  which  the  fractional  part  is
  3524.               dropped.   If  such an integer expression involving
  3525.               division is later converted to a real datatype,  it
  3526.               may be that a real type division had been intended.
  3527.               Controlled by -truncation=int-div-real option.
  3528.  
  3529.  
  3530.        Warning: Integer quotient expr used in exponent
  3531.               The quotient of two integers results in an  integer
  3532.               type  result,  in  which  the  fractional  part  is
  3533.               dropped.  If such an integer expression is used  as
  3534.               an  exponent,  it  is quite likely that a real type
  3535.               division  was  intended.   Controlled  by  -trunca-
  3536.               tion=int-div-exponent option.
  3537.  
  3538.  
  3539.        Warning: NAME not set when RETURN encountered
  3540.               The way that functions in Fortran return a value is
  3541.               by assigning the value to the name of the function.
  3542.               This  message  indicates  that the function was not
  3543.               assigned a value before the point  where  a  RETURN
  3544.               statement was found.  Therefore it is possible that
  3545.               the function could return an undefined value.
  3546.  
  3547.  
  3548.        Warning: Nonstandard syntax: adjustable size cannot  be
  3549.               concate- nated here
  3550.               The Fortran 77 Standard forbids concatenating char-
  3551.               acter variables whose size is an asterisk in paren-
  3552.               theses, except in an assignment  statement.    Con-
  3553.               trolled by -f77=mixed-expr.
  3554.  
  3555.  
  3556.        Warning:  Nonstandard  syntax  :  significant  characters
  3557.               past 72 columns
  3558.               This  warning  is  given  under  the -f77=long-line
  3559.  
  3560.  
  3561.  
  3562.                             4 Apr 1996                         54
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3569.  
  3570.  
  3571.               setting if the -columns setting has  been  used  to
  3572.               increase the statement field width, and a statement
  3573.               has  meaningful  program  text  beyond  column  72.
  3574.               Standard Fortran ignores all text in those columns,
  3575.               but some compilers do not.  Thus the program may be
  3576.               treated differently by different compilers.
  3577.  
  3578.  
  3579.        Warning: Nonstandard syntax : Statement out of order.
  3580.               ftnchek  will detect statements that are out of the
  3581.               sequence specified for ANSI  standard  Fortran  77.
  3582.               Table  1 illustrates the allowed sequence of state-
  3583.               ments in the Fortran  language.   Statements  which
  3584.               are  out  of  order  are nonetheless interpreted by
  3585.               ftnchek, to prevent ``cascades'' of error messages.
  3586.               The sequence counter is also rolled back to prevent
  3587.               repetition of the error message for a block of sim-
  3588.               ilar  statements.   Controlled  by  the -f77=state-
  3589.               ment-order option.
  3590.  
  3591.  
  3592.  
  3593.               --------------------------------------------------------
  3594.                                 |               | implicit
  3595.                                 |  parameter    |---------------------
  3596.                                 |               | other specification
  3597.                       format    |---------------|---------------------
  3598.                        and      |               | statement-function
  3599.                       entry     |  data         |---------------------
  3600.                                 |               | executable
  3601.               --------------------------------------------------------
  3602.  
  3603.                                     Table 1
  3604.  
  3605.  
  3606.        Warning: Possible division by zero
  3607.               This message is printed out  wherever  division  is
  3608.               done  (except  division  by a constant).  Use it to
  3609.               help locate a runtime  division  by  zero  problem.
  3610.               Controlled by -division option.
  3611.  
  3612.  
  3613.        Warning: real truncated to intg
  3614.               ftnchek  has detected an assignment statement which
  3615.               has a real expression on the right, but an  integer
  3616.               variable  on  the left.  The fractional part of the
  3617.               real value will be lost.  If you explicitly convert
  3618.               the  real  expression  to  integer using the INT or
  3619.               NINT  intrinsic  function,  no  warning   will   be
  3620.               printed.   A similar message is printed if a double
  3621.               precision expression is assigned to a single preci-
  3622.               sion   variable,   etc.    Controlled  by  -trunca-
  3623.               tion=demotion option.
  3624.  
  3625.  
  3626.  
  3627.  
  3628.                             4 Apr 1996                         55
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3635.  
  3636.  
  3637.        Warning: subscript is not integer
  3638.               Since array subscripts are normally integer quanti-
  3639.               ties,  the use of a non-integer expression here may
  3640.               signal   an   error.    Controlled   by    -trunca-
  3641.               tion=real-subscript option.
  3642.  
  3643.  
  3644.        Warning: Unknown intrinsic function
  3645.               This message warns the user that a name declared in
  3646.               an  INTRINSIC  statement  is  unknown  to  ftnchek.
  3647.               Probably  it  is  a nonstandard intrinsic function,
  3648.               and so the program will not be portable.  The func-
  3649.               tion  will  be treated by ftnchek as a user-defined
  3650.               function.  This warning is not  suppressed  by  any
  3651.               option,  since it affects ftnchek's analysis of the
  3652.               program.  However, if the intrinsic function is  in
  3653.               one  of  the  supported sets of nonstandard intrin-
  3654.               sics, you can use the -intrinsic setting  to  cause
  3655.               ftnchek to recognize it.
  3656.  
  3657.  
  3658. LIMITATIONS AND EXTENSIONS
  3659.        ftnchek  accepts  ANSI  standard  Fortran-77 programs with
  3660.        some minor limitations and numerous common extensions.
  3661.  
  3662.        Limitations:
  3663.  
  3664.               ftnchek uses only one line of lookahead  when  ana-
  3665.               lyzing a program into its basic syntactic elements.
  3666.               If a particular statement is difficult to identify,
  3667.               it  may  be  handled improperly if the ambiguity is
  3668.               not resolved on a  single  line.   This  limitation
  3669.               applies  to complex constants except in DATA state-
  3670.               ments, and to situations in which a  variable  name
  3671.               might  be confused with a keyword.  For example, if
  3672.               the variable name WRITE is used for an array,  then
  3673.               a  very  long  statement  assigning a value to some
  3674.               element of this array could be mistaken as a  WRITE
  3675.               statement  if  the  equals  sign is not on the same
  3676.               line as the word WRITE.
  3677.  
  3678.               The dummy  arguments  in  statement  functions  are
  3679.               treated  like  ordinary  variables  of the program.
  3680.               That is, their scope is the entire module, not just
  3681.               the statement function definition.
  3682.  
  3683.               The  checking of FORMAT statements is lax, tolerat-
  3684.               ing missing separators (comma, etc.) between format
  3685.               descriptors  in  places where the Standard requires
  3686.               them, and allowing .d fields  on  descriptors  that
  3687.               should not have them.  It does warn under -f77=for-
  3688.               mat-edit-descr about nonstandard  descriptor  types
  3689.               (like O), and supported extensions.
  3690.  
  3691.  
  3692.  
  3693.  
  3694.                             4 Apr 1996                         56
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3701.  
  3702.  
  3703.               The  only  checking related to control of execution
  3704.               flow is a warning about statements that  cannot  be
  3705.               reached  because  they do not have a label and they
  3706.               follow an  unconditional  transfer.   There  is  no
  3707.               checking  for correct nesting of DO loops or match-
  3708.               ing of opening statements such as IF ... THEN  with
  3709.               closing  statements  such  as ENDIF, nor the proper
  3710.               definition and use  of  statement  labels.   Fortu-
  3711.               nately, most compilers will catch these errors.
  3712.  
  3713.               If  a user-supplied subprogram has the same name as
  3714.               one of the nonstandard intrinsic  functions  recog-
  3715.               nized  by ftnchek, it must be declared in an EXTER-
  3716.               NAL statement in any routine that invokes it.  Oth-
  3717.               erwise  it will be subject to the checking normally
  3718.               given to the intrinsic function.   Since  the  non-
  3719.               standard intrinsics are not standard, this EXTERNAL
  3720.               statement is not required by the Fortran  77  Stan-
  3721.               dard.   Using the -intrinsic=0 setting, recognition
  3722.               of  most  nonstandard  intrinsics  (excepting  only
  3723.               those  needed  to  support  the double complex data
  3724.               type) can be turned off.  See  the  lists  of  sup-
  3725.               ported  nonstandard  intrinsic  functions under the
  3726.               discussion of the -intrinsic setting above.
  3727.  
  3728.        Extensions:
  3729.               All of these extensions (except lower-case  charac-
  3730.               ters)  will  generate warnings if the relevant -f77
  3731.               option is set.  Some of the extensions listed below
  3732.               are  part  of  the  Fortran-90 Standard.  These are
  3733.               indicated by the notation (F90).
  3734.  
  3735.               Tabs are permitted, and translated into  equivalent
  3736.               blanks  which  correspond  to  tab  stops  every  8
  3737.               columns.  The standard  does  not  recognize  tabs.
  3738.               Note that some compilers allow tabs, but treat them
  3739.               differently.  The treatment defined for DEC FORTRAN
  3740.               can be achieved using -source setting value 1.
  3741.  
  3742.               Strings  may  be delimited by either quote marks or
  3743.               apostrophes.  A sequence of two  delimiter  charac-
  3744.               ters  is interpreted as a single embedded delimiter
  3745.               character.  (F90)
  3746.  
  3747.               Strings may  contain  UNIX-style  backslash  escape
  3748.               sequences.  They will be interpreted as such if the
  3749.               -source value 4 (backslash)  is  given.   Otherwise
  3750.               the backslash character will be treated as a normal
  3751.               printing character.
  3752.  
  3753.               Lower case characters are permitted, and  are  con-
  3754.               verted  internally to uppercase except in character
  3755.               strings.  The standard specifies upper  case  only,
  3756.               except in comments and strings.  (F90)
  3757.  
  3758.  
  3759.  
  3760.                             4 Apr 1996                         57
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3767.  
  3768.  
  3769.               Hollerith  constants  are  permitted, in accordance
  3770.               with the Fortran 77  Standard,  appendix  C.   They
  3771.               should not be used in expressions, or confused with
  3772.               datatype CHARACTER.
  3773.  
  3774.               The letter 'D' (upper or lower case) in column 1 is
  3775.               treated as the beginning of a comment.  There is no
  3776.               option to treat such lines as statements instead of
  3777.               comments.
  3778.  
  3779.               Statements  may  be longer than 72 columns provided
  3780.               that the setting -column was used to  increase  the
  3781.               limit.   According  to  the standard, all text from
  3782.               columns 73 through 80 is ignored, and no  line  may
  3783.               be longer than 80 columns.
  3784.  
  3785.               Variable  names  may be longer than six characters.
  3786.               The standard specifies six as the maximum.  ftnchek
  3787.               permits names up to 31 characters long (F90).
  3788.  
  3789.               Variable  names  may contain underscores and dollar
  3790.               signs, which are treated  the  same  as  alphabetic
  3791.               letters.   The default type for variables beginning
  3792.               with these characters is REAL.   In  IMPLICIT  type
  3793.               statements  specifying  a  range of characters, the
  3794.               dollar sign follows Z and  is  followed  by  under-
  3795.               score.   Fortran 90 permits underscores in variable
  3796.               names.
  3797.  
  3798.               The UNIX version tolerates the presence of  prepro-
  3799.               cessor  directives, namely lines beginning with the
  3800.               pound sign (#).  These  are  treated  as  comments,
  3801.               except for #line directives, which are interpreted,
  3802.               and are used to set the line number and source file
  3803.               name  for  warnings  and error messages.  Note that
  3804.               #include directives are not processed  by  ftnchek.
  3805.               Programs  that  use them for including source files
  3806.               should be passed through  the  preprocessor  before
  3807.               being  input  to  ftnchek.  As noted below, ftnchek
  3808.               does process INCLUDE statements, which have a  dif-
  3809.               ferent syntax.
  3810.  
  3811.               The  DO  ...  ENDDO control structure is permitted.
  3812.               The syntax which  is  recognized  is  according  to
  3813.               either of the following two forms:
  3814.                    DO [label [,]] var = expr , expr [, expr]
  3815.                     ...
  3816.                    END DO
  3817.               or
  3818.                    DO [label [,]] WHILE ( expr )
  3819.                     ...
  3820.                    END DO
  3821.               where  square  brackets indicate optional elements.
  3822.               This is a subset of the Fortran 90 do-loop  syntax.
  3823.  
  3824.  
  3825.  
  3826.                             4 Apr 1996                         58
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3833.  
  3834.  
  3835.               The  ACCEPT  and TYPE statements (for terminal I/O)
  3836.               are permitted, with the same syntax as PRINT.
  3837.  
  3838.               The so-called ``Cray pointer'' syntax is tolerated.
  3839.               It is not the same as the Fortran 90 POINTER state-
  3840.               ment.  There is no real checking of  the  statement
  3841.               other  than  basic syntax.  The form of this state-
  3842.               ment is
  3843.                  POINTER (pointer, pointee) [,(pointer, pointee)]
  3844.               The  pointer  variables are assigned a data type of
  3845.               INTEGER *4.  Usage checking of  the  pointee  vari-
  3846.               ables  is  suppressed,  since  in practice they are
  3847.               accessed indirectly via the pointers.
  3848.  
  3849.               Statements may  have  any  number  of  continuation
  3850.               lines.  The standard allows a maximum of 19.
  3851.  
  3852.               Inline  comments,  beginning  with  an  exclamation
  3853.               mark, are permitted.  (F90)
  3854.  
  3855.               NAMELIST I/O is supported.  The syntax is the  same
  3856.               as in Fortran 90.
  3857.  
  3858.               FORMAT  statements  can  contain  a  dollar sign to
  3859.               indicate suppression of carriage-return.  An  inte-
  3860.               ger  expression  enclosed  in angle brackets can be
  3861.               used anywhere in a FORMAT statement where the  For-
  3862.               tran 77 Standard allows an integer constant (except
  3863.               for the length of a Hollerith constant), to provide
  3864.               a  run-time  value  for  a  repeat specification or
  3865.               field width.
  3866.  
  3867.               Nonstandard keywords are allowed in I/O statements,
  3868.               corresponding to those in VMS Fortran.
  3869.  
  3870.               The  IMPLICIT  NONE  statement  is  supported.  The
  3871.               meaning of this statement  is  that  all  variables
  3872.               must  have  their  data  types explicitly declared.
  3873.               Rather than flag the occurrences of such  variables
  3874.               with  syntax error messages, ftnchek waits till the
  3875.               end of the module, and then prints out  a  list  of
  3876.               all  undeclared  variables,  as  it  does  for  the
  3877.               -declare option.  (F90)
  3878.  
  3879.               Data types INTEGER, REAL, COMPLEX, and LOGICAL  are
  3880.               allowed to have an optional precision specification
  3881.               in type declarations.  For instance,  REAL*8  means
  3882.               an  8-byte  floating  point  data type.  The REAL*8
  3883.               datatype is not necessarily  considered  equivalent
  3884.               to  DOUBLE  PRECISION,  depending  on the -wordsize
  3885.               setting.  The Fortran 77 Standard allows  a  length
  3886.               specification only for CHARACTER data.
  3887.  
  3888.               ftnchek    supports   the   DOUBLE   COMPLEX   type
  3889.  
  3890.  
  3891.  
  3892.                             4 Apr 1996                         59
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3899.  
  3900.  
  3901.               specification for a complex quantity whose real and
  3902.               imaginary  parts  are double precision.  Mixed-mode
  3903.               arithmetic involving single-precision complex  with
  3904.               double-precision  real  data,  prohibited under the
  3905.               Standard, yields a double complex result.
  3906.  
  3907.               Many commonly found nonstandard intrinsic functions
  3908.               are provided.  See the discussion of -intrinsic for
  3909.               a list of functions and how to control  which  ones
  3910.               are recognized..
  3911.  
  3912.               Argument  checking  is not tight for those nonstan-
  3913.               dard intrinsics that take arrays or mixed  argument
  3914.               types.
  3915.  
  3916.               ftnchek permits the INCLUDE statement, which causes
  3917.               inclusion of the text of the given file.  The  syn-
  3918.               tax is
  3919.                    INCLUDE 'filename'
  3920.  
  3921.               This is compatible with Fortran 90.  If the -source
  3922.               setting value 2 is given, ftnchek follows VMS  con-
  3923.               ventions with respect to this statement: it assumes
  3924.               a default extension of .for if no  filename  exten-
  3925.               sion  is  given, and allows the qualifier /[NO]LIST
  3926.               following the filename, to control the  listing  of
  3927.               the included file.  There is no support for includ-
  3928.               ing VMS text modules.
  3929.  
  3930.               In diagnostic output relating to items contained in
  3931.               include  files, the location of the error is speci-
  3932.               fied by both its location in the include  file  and
  3933.               the  location in the parent file where the file was
  3934.               included.
  3935.  
  3936.               ftnchek accepts PARAMETER definitions that  involve
  3937.               intrinsic  functions  and  exponentiation by a non-
  3938.               integer exponent.  Both of these cases are  prohib-
  3939.               ited by the Fortran 77 Standard, and will be warned
  3940.               about if the -f77=param-intrinsic  flag  is  given.
  3941.               If  an  intrinsic  function value is a compile-time
  3942.               integer constant, ftnchek will evaluate  it.   This
  3943.               allows  better checking if the parameter is used in
  3944.               declaring array sizes.  Fortran 90 allows intrinsic
  3945.               functions in PARAMETER definitions.
  3946.  
  3947.               The intrinsic functions that are evaluated are:
  3948.                   ABS       IABS      DIM       IDIM      MAX
  3949.                   MAX0      MIN       MIN0      MOD       SIGN
  3950.                   ISIGN     LEN       ICHAR     INDEX
  3951.  
  3952.               The  functions  of  integer arguments are evaluated
  3953.               only if the arguments are integer constant  expres-
  3954.               sions.    (These  may  involve  integer  constants,
  3955.  
  3956.  
  3957.  
  3958.                             4 Apr 1996                         60
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  3965.  
  3966.  
  3967.               parameters,  and  evaluated  intrinsic  functions.)
  3968.               The function LEN is evaluated if its argument is an
  3969.               expression involving only character  constants  and
  3970.               variables  whose  length  is  not  adjustable.  The
  3971.               functions ICHAR and INDEX are evaluated only if the
  3972.               arguments are character constants.  ftnchek gives a
  3973.               warning if it needs the  value  of  some  intrinsic
  3974.               function that is not evaluated.
  3975.  
  3976. NEW FEATURES
  3977.        Here are the changes from Version 2.8 to Version 2.9:
  3978.  
  3979.        1.  The  -usage flag is now a 3-digit number, for separate
  3980.            control of checking of subprograms, common  variables,
  3981.            and local variables.
  3982.  
  3983.        2.  New   command-line   options:   -nocheck,  -intrinsic,
  3984.            -source,  -version  .   Changed  -f77,   -portability,
  3985.            -pretty  and  -truncation from switches to string set-
  3986.            tings that allow detailed control of warnings.  Elimi-
  3987.            nated  -backslash,  -hollerith and -tab switches which
  3988.            are now handled by -source and -portability  settings.
  3989.            Changed name of -noverbose option to -quiet.
  3990.  
  3991.        3.  Ftnchek  now  reads a startup file named .ftnchekrc or
  3992.            ftnchek.ini located in the current directory or in the
  3993.            home directory.
  3994.  
  3995.        4.  Added  a new -makedcls value: 512=no-array-dimensions.
  3996.  
  3997.        5.  Command-line numeric settings  can  omit  the  number,
  3998.            giving them default turn-on values.
  3999.  
  4000.        6.  The  -calltree  option  now takes various numeric set-
  4001.            tings to specify options for the form of the output.
  4002.  
  4003.        7.  The non-parenthesis PARAMETER statement  variant,  and
  4004.            the Cray POINTER statement are now part of the distri-
  4005.            bution, i.e. no longer  as  patches  accompanying  the
  4006.            source.
  4007.  
  4008.        8.  Two  new  warnings: common block and subprogram having
  4009.            the same name, controlled by the -f77 flag; and state-
  4010.            ment  function defined but not used, controlled by the
  4011.            -usage setting.
  4012.  
  4013.        9.  The support for VCG output has been improved  so  that
  4014.            ftnchek  now  sends  output to a file that is suitable
  4015.            for direct input to xvcg.  The script fcl2vcg  is  now
  4016.            obsolete.  Support for VCG is now standard.
  4017.  
  4018.        10. Various  minor  bugs were fixed, and some improvements
  4019.            were made to help in maintaining and distributing  the
  4020.            program:  the  source  code  has  been  augmented with
  4021.  
  4022.  
  4023.  
  4024.                             4 Apr 1996                         61
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  4031.  
  4032.  
  4033.            function prototypes, and a configure script is used to
  4034.            handle variations among systems automatically.
  4035.  
  4036.        11. Support  for VMS I/O keywords is now standard.  Previ-
  4037.            ously it was only enabled in VMS version.
  4038.  
  4039.        12. Recognition of nonstandard intrinsic functions is  now
  4040.            controlled  by command-line option -intrinsic.  Previ-
  4041.            ously the choice was set when building ftnchek.
  4042.  
  4043.        13. Support for quad precision constants (such as  1.23Q4)
  4044.            and intrinsic functions was added.
  4045.  
  4046.        Here are the changes from Version 2.7 to Version 2.8:
  4047.  
  4048.        1.  Improvements  in  handling  command-line settings: add
  4049.            support for colon as assignment operator,  and  extend
  4050.            setting  switch  support to include a default value to
  4051.            replace out-of-range values, instead of just  choosing
  4052.            the nearer endpoint of the valid range.
  4053.  
  4054.        2.  New options: -makedcls=num to generate variable decla-
  4055.            rations; -backslash  to  handle  UNIX-style  backslash
  4056.            escapes  in  character strings; -resource to print out
  4057.            internal resource usage; -tab to accept DEC-style tab-
  4058.            formatted source.
  4059.  
  4060.        3.  New  extensions  to  syntax:  Accept quote marks as an
  4061.            alternative to  apostrophes  for  delimiting  strings.
  4062.            Accept  'D'  as equivalent to 'C' in column 1 for com-
  4063.            ments.  A patch is supplied to allow ``Cray  pointer''
  4064.            syntax  to be tolerated.  (This patch does not include
  4065.            checking proper use of pointers.)
  4066.  
  4067.        4.  Provide variable names and not just  position  numbers
  4068.            in  warnings about mismatches in common block declara-
  4069.            tions and subprogram argument lists.
  4070.  
  4071.        5.  Add installation validation suite to check for correct
  4072.            functioning  after a new installation, or a new compi-
  4073.            lation with a different compiler or compiler  options.
  4074.            The validation suite also serves to record input cases
  4075.            that exhibited bugs in older versions of the  program,
  4076.            providing regression testing to ensure that changes do
  4077.            not introduce new bugs, or  restore  old  ones.   This
  4078.            test  suite  uncovered compiler optimizer errors on at
  4079.            least one system, errors which did not appear in older
  4080.            versions of ftnchek.
  4081.  
  4082.        6.  Improve  memory  management  to  avoid  running out of
  4083.            space.
  4084.  
  4085.        7.  Update the UNIX Makefile with  new  targets  following
  4086.            the Free Software Foundation standards, and create the
  4087.  
  4088.  
  4089.  
  4090.                             4 Apr 1996                         62
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  4097.  
  4098.  
  4099.            CHECKLIST file to record systems for which  this  ver-
  4100.            sion  of  ftnchek  has been successfully built and has
  4101.            passed the validation suite tests.
  4102.  
  4103.        8.  Add the man2ps script, and a target in the UNIX  Make-
  4104.            file to use it for converting the manual pages file to
  4105.            PostScript.
  4106.  
  4107.        9.  Correct several small typographical irregularities  in
  4108.            these manual pages.  troff preserves all input spaces,
  4109.            so great care is needed in preparing  troff  input  to
  4110.            avoid introducing spurious space into the typeset out-
  4111.            put.
  4112.  
  4113.        Grateful acknowledgement is given to Nelson H. F. Beebe of
  4114.        the  University  of  Utah  for  providing  most  of  these
  4115.        improvements, and especially for writing most of  the  new
  4116.        code  to produce variable declarations, which represents a
  4117.        very substantial effort.
  4118.  
  4119. BUGS
  4120.        ftnchek still has much room for improvement.   Your  feed-
  4121.        back  is  appreciated.  We want to know about any bugs you
  4122.        notice.  Bugs include not  only  cases  in  which  ftnchek
  4123.        issues an error message where no error exists, but also if
  4124.        ftnchek fails to issue a warning when it ought to.   Note,
  4125.        however,  that ftnchek is not intended to catch all syntax
  4126.        errors (see section on Limitations).  Also, it is not con-
  4127.        sidered a bug for a variable to be reported as used before
  4128.        set, if the reason is  that  the  usage  of  the  variable
  4129.        occurs  prior  in  the  text to where the variable is set.
  4130.        For instance, this could occur when a GOTO  causes  execu-
  4131.        tion  to  loop  backward to some previously skipped state-
  4132.        ments.  ftnchek does not analyze  the  program  flow,  but
  4133.        assumes  that statements occurring earlier in the text are
  4134.        executed before the following ones.
  4135.  
  4136.        We especially want to know if ftnchek crashes for any rea-
  4137.        son.   It  is not supposed to crash, even on programs with
  4138.        syntax errors.  Suggestions are  welcomed  for  additional
  4139.        features  which  you would find useful.  Tell us if any of
  4140.        ftnchek's messages are incomprehensible.  Comments on  the
  4141.        readability  and  accuracy  of this document are also wel-
  4142.        come.
  4143.  
  4144.        You may also suggest support for additional extensions  to
  4145.        the  Fortran  language.  These will be included only if it
  4146.        is  felt  that  the  extensions  are  sufficiently  widely
  4147.        accepted by compilers.
  4148.  
  4149.        If  you  find  a bug in ftnchek, first consult the list of
  4150.        known bugs below to see if it has already  been  reported.
  4151.        Also  check  the section entitled ``Limitations and Exten-
  4152.        sions'' above for restrictions that could be  causing  the
  4153.  
  4154.  
  4155.  
  4156.                             4 Apr 1996                         63
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  4163.  
  4164.  
  4165.        problem.   If  you  do  not find the problem documented in
  4166.        either place, then send a report including
  4167.  
  4168.        1.  The operating system and CPU type on which ftnchek  is
  4169.            running.
  4170.  
  4171.        2.  The  version  of ftnchek and values of any environment
  4172.            options or settings defined in startup file.  (Captur-
  4173.            ing the output of ftnchek -help is useful for this.)
  4174.  
  4175.        3.  A brief description of the bug.
  4176.  
  4177.        4.  If possible, a small sample program showing the bug.
  4178.  
  4179.        The report should be sent to the following address:
  4180.                   moniot@mary.fordham.edu
  4181.  
  4182.        Highest priority will be given to bugs which cause ftnchek
  4183.        to crash.
  4184.  
  4185.        Certain problems that arise when checking  large  programs
  4186.        can  be fixed by increasing the sizes of the data areas in
  4187.        ftnchek.  (These problems are generally signaled by  error
  4188.        messages  beginning  with  ``Oops''.)  The simplest way to
  4189.        increase the table sizes is by  recompiling  ftnchek  with
  4190.        the  LARGE_MACHINE  macro name defined.  Consult the make-
  4191.        file and README file for the method of doing this.
  4192.  
  4193.        The following is a list of known bugs.
  4194.  
  4195.        1.  Bug: Used-before-set message  is  suppressed  for  any
  4196.            variable  which  is  used  as  the  loop  index  in an
  4197.            implied-do loop, even if it was in  fact  used  before
  4198.            being  set  in  some  earlier statement.  For example,
  4199.            consider J in the statement
  4200.  
  4201.                  WRITE(5,*) (A(J), J=1,10)
  4202.  
  4203.            Here ftnchek parses the I/O expression, A(J), where  J
  4204.            is  used, before it parses the implied loop where J is
  4205.            set.  Normally this would cause ftnchek  to  report  a
  4206.            spurious  used-before-set  warning  for J.  Since this
  4207.            report is usually in error and occurs fairly commonly,
  4208.            ftnchek suppresses the warning for J altogether.
  4209.  
  4210.            Prognosis:  A  future  version  of  ftnchek is planned
  4211.            which will handle implied-do loops correctly.
  4212.  
  4213.        2.  Bug: Variables used (not as arguments)  in  statement-
  4214.            function  subprograms  do  not have their usage status
  4215.            updated when the statement function is invoked.
  4216.  
  4217.            Prognosis: To be fixed in a future version of ftnchek.
  4218.  
  4219.  
  4220.  
  4221.  
  4222.                             4 Apr 1996                         64
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  4229.  
  4230.  
  4231.        3.  Bug:  VAX  version  does not expand wildcards in file-
  4232.            names on the command line if they are followed without
  4233.            space  by  an option, e.g.  ftnchek *.f/calltree would
  4234.            not expand the *.f.  This is because VMS-style options
  4235.            without intervening space are not supported by the GNU
  4236.            shell_mung routine that is used to expand wildcards.
  4237.  
  4238.            Prognosis: unlikely to be fixed.
  4239.  
  4240.  
  4241. ACKNOWLEDGEMENTS
  4242.        ftnchek is a public-domain program.  It  was  designed  by
  4243.        Dr.  Robert Moniot, professor at Fordham University.  Dur-
  4244.        ing the academic year  of  1988-1989,  Michael  Myers  and
  4245.        Lucia Spagnuolo developed the program to perform the vari-
  4246.        able usage checks.  During the following year it was  aug-
  4247.        mented  by  Lois  Bigbie to check subprogram arguments and
  4248.        COMMON block declarations.  Brian  Downing  assisted  with
  4249.        the  implementation  of the INCLUDE statement.  John Quinn
  4250.        wrote the common block usage checks.  Nelson H.  F.  Beebe
  4251.        of  the  University  of Utah added most of the new code to
  4252.        implement the -makedcls feature.  The  -reference  feature
  4253.        was  contributed  by  Gerome Emmanuel, Ecole des mines, U.
  4254.        Nancy (slightly modified).  The support for  Cray  pointer
  4255.        syntax  was  provided by John Dannenhoffer of United Tech-
  4256.        nologies Research Center.   Additional  features  will  be
  4257.        added  as  time  permits.   With Version 2.5, the name was
  4258.        changed from forchek to ftnchek, to avoid confusion with a
  4259.        similar  program named forcheck, developed earlier at Lei-
  4260.        den University.
  4261.  
  4262.        We would like to thank John  Amor  of  the  University  of
  4263.        British  Columbia,  Reg  Clemens of the Air Force Phillips
  4264.        Lab in Albuquerque, Markus Draxler of  the  University  of
  4265.        Stuttgart,  Victor Eijkhout of the University of Tennessee
  4266.        at Knoxville, Greg Flint of Purdue University,  Daniel  P.
  4267.        Giesy  of  NASA  Langley Research Center, Fritz Keinert of
  4268.        Iowa State University, Judah Milgram of the University  of
  4269.        Maryland  College  Park,  Hugh  Nicholas of the Pittsburgh
  4270.        Supercomputing Center, Dan Severance of  Yale  University,
  4271.        Phil  Sterne  of  Lawrence  Livermore National Laboratory,
  4272.        Larry Weissman of the University of Washington, Warren  J.
  4273.        Wiscombe  of  NASA  Goddard,  and  especially Nelson H. F.
  4274.        Beebe of the University of Utah, for pointing out bugs and
  4275.        suggesting some improvements.  We also thank Jack Dongarra
  4276.        for putting ftnchek into the netlib  library  of  publicly
  4277.        available software.
  4278.  
  4279.  
  4280. INSTALLATION AND SUPPORT
  4281.        The  ftnchek program can be obtained by anonymous ftp from
  4282.        many   software   servers,   including   host   netlib.org
  4283.        (128.169.92.17) where it is located in directory /fortran.
  4284.        You should download  it  in  binary  mode.   If  the  file
  4285.  
  4286.  
  4287.  
  4288.                             4 Apr 1996                         65
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294. FTNCHEK 2.9(1L)                                   FTNCHEK 2.9(1L)
  4295.  
  4296.  
  4297.        extension  is  .Z,  uncompress with the Unix uncompress(1)
  4298.        utility.  If the file extension is  .gz,  uncompress  with
  4299.        the GNU gunzip(1L) program.  Then use tar(1) to unpack the
  4300.        files into a subdirectory.
  4301.  
  4302.        Installation requires a C compiler for your computer.  See
  4303.        the  INSTALL  file  provided  with  the  distribution  for
  4304.        instructions on installing ftnchek on your  system.   Exe-
  4305.        cutable  binary  for  particular systems such as IBM PC or
  4306.        Macintosh, as available, can be obtained by anonymous  ftp
  4307.        from ftp.dsm.fordham.edu (150.108.64.2), located in direc-
  4308.        tory /pub/ftnchek2.9.  Assistance in preparing  such  exe-
  4309.        cutable binary forms is welcome.
  4310.  
  4311.  
  4312.        The  nroff  version of this document is named ftnchek.man.
  4313.        On UNIX systems, this file can be used as  the  man  page,
  4314.        but  actually  it  is a multi-purpose source file which is
  4315.        used to produce the other forms of the documentation.  The
  4316.        cleaned-up  man page document, created during installation
  4317.        of ftnchek, is named ftnchek.1.  You can  print  it  using
  4318.        the command
  4319.              nroff -man ftnchek.1 | lpr.
  4320.        The distribution also includes a plain ASCII version named
  4321.        ftnchek.doc, a PostScript version named ftnchek.ps, and  a
  4322.        VMS HELP version named ftnchek.hlp.
  4323.  
  4324.        Information about the latest version and the status of the
  4325.        project can be obtained by the Internet  command  ``finger
  4326.        ftnchek@mary.fordham.edu''.   For  further information and
  4327.        to report bugs, you may contact Dr. Robert Moniot  at  the
  4328.        following network address:
  4329.  
  4330.                   moniot@mary.fordham.edu
  4331.  
  4332.  
  4333. SEE ALSO
  4334.        dcl2inc(1L),   dtoq(1L),   dtos(1L),   f77(1),   fd2s(1L),
  4335.        fs2d(1L),   pfort(1L),   qtod(1L),   sf3(1L),    stod(1L).
  4336.        xsf3(1L), xvcg(1L).
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.                             4 Apr 1996                         66
  4355.  
  4356.  
  4357.