home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / FTNCHEKA.ZIP / ftnchek.doc < prev    next >
Text File  |  1993-01-16  |  84KB  |  3,301 lines

  1.  
  2.  
  3.  
  4.                          * * * * * * * * * * * * * *
  5.                          * * *                 * * *
  6.                          * * *  F T N C H E K  * * *
  7.                          * * *    VER. 2.6     * * *
  8.                          * * *  JANUARY, 1993  * * *
  9.                          * * *                 * * *
  10.                          * * * * * * * * * * * * * *
  11.  
  12.  
  13.  
  14.  
  15.                                    CONTENTS
  16.  
  17.  
  18.  
  19.         1       INTRODUCTION . . . . . . . . . . . . . . . . . . . . 1
  20.  
  21.  
  22.         2       INVOKING FTNCHEK . . . . . . . . . . . . . . . . . . 2
  23.  
  24.  
  25.         3       FTNCHEK OPTIONS  . . . . . . . . . . . . . . . . . . 6
  26.         3.1       Changing The Defaults  . . . . . . . . . . . . .  20
  27.  
  28.  
  29.         4       AN EXAMPLE . . . . . . . . . . . . . . . . . . . .  23
  30.  
  31.  
  32.         5       INTERPRETING THE OUTPUT  . . . . . . . . . . . . .  29
  33.  
  34.  
  35.         6       LIMITATIONS AND EXTENSIONS . . . . . . . . . . . .  39
  36.  
  37.  
  38.         7       NEW FEATURES . . . . . . . . . . . . . . . . . . .  44
  39.  
  40.  
  41.         8       BUGS . . . . . . . . . . . . . . . . . . . . . . .  46
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. FTNCHEK                                                         Page 1
  68.  
  69.  
  70.      1  INTRODUCTION
  71.  
  72.  
  73.  
  74.  
  75.           Ftnchek (short for  Fortran  checker)  is  designed  to
  76.  
  77.      detect  certain  errors in a Fortran program that a compiler
  78.  
  79.      usually does not.  Ftnchek  is  not  primarily  intended  to
  80.  
  81.      detect  syntax  errors. Its purpose is to assist the user in
  82.  
  83.      finding semantic errors. Semantic errors are  legal  in  the
  84.  
  85.      Fortran  language  but  are  wasteful or may cause incorrect
  86.  
  87.      operation. For example, variables which are never  used  may
  88.  
  89.      indicate   some   omission  in  the  program;  uninitialized
  90.  
  91.      variables contain garbage which may cause incorrect  results
  92.  
  93.      to  be  calculated; and variables which are not declared may
  94.  
  95.      not have the intended type. Ftnchek is  intended  to  assist
  96.  
  97.      users  in  the debugging of their Fortran program. It is not
  98.  
  99.      intended to catch all syntax errors. This is the function of
  100.  
  101.      the compiler. Prior to using Ftnchek, the user should verify
  102.  
  103.      that the program compiles correctly.
  104.  
  105.  
  106.           This document first summarizes how to  invoke  Ftnchek.
  107.  
  108.      That section should be read before beginning to use Ftnchek.
  109.  
  110.      Later sections describe Ftnchek's options  in  more  detail,
  111.  
  112.      give an example of its use, and explain how to interpret the
  113.  
  114.      output. The final sections mention the limitations and known
  115.  
  116.      bugs in Ftnchek.
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. FTNCHEK                                                         Page 2
  134.  
  135.  
  136.      2  INVOKING FTNCHEK
  137.  
  138.  
  139.  
  140.  
  141.      Ftnchek is invoked through a command of the form:
  142.  
  143.  
  144.          $ ftnchek [-option -option ...] filename [filename ...]
  145.  
  146.  
  147.  
  148.           The brackets indicate something which is optional.  The
  149.  
  150.      brackets themselves are not actually typed. Here options are
  151.  
  152.      command-line  switches  or  settings,  which   control   the
  153.  
  154.      operation  of the program and the amount of information that
  155.  
  156.      will be printed out. If no option is specified, the  default
  157.  
  158.      action   is   to   print   error   messages,  warnings,  and
  159.  
  160.      informational messages,  but  not  the  program  listing  or
  161.  
  162.      symbol tables.
  163.  
  164.  
  165.           Each option begins with the '-' character. (On  VAX/VMS
  166.  
  167.      or  MS-DOS  systems  you  may  use  either  '/' or '-'.) The
  168.  
  169.      options are described at greater length in the next section.
  170.  
  171.  
  172.           Ftnchek options fall  into  two  categories:  switches,
  173.  
  174.      which  are  either true or false, and settings, which have a
  175.  
  176.      numeric or string value. The name of a switch is prefixed by
  177.  
  178.      'no'  to  turn  it  off:  e.g.  -nopure  would  turn off the
  179.  
  180.      warnings about impure functions. The 'no' prefix can also be
  181.  
  182.      used with numeric settings, having the effect of turning off
  183.  
  184.      the corresponding warnings. Only the first 3  characters  of
  185.  
  186.      an option name (not counting the '-') need be provided.
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199. FTNCHEK                                                         Page 3
  200.  
  201.  
  202.           The switches which Ftnchek currently recognizes are:
  203.  
  204.  
  205.           -calltree      Print tree of subprogram call hierarchy.
  206.                          Default = no.
  207.  
  208.           -declare       Print a list of  all  identifiers  whose
  209.                          datatype  is  not  explicitly  declared.
  210.                          Default = no.
  211.  
  212.           -division      Warn wherever division is  done  (except
  213.                          division by a constant). Default = no.
  214.  
  215.           -extern        Warn if external subprograms  which  are
  216.                          invoked  are  never  defined.  Default =
  217.                          yes.
  218.  
  219.           -f77           Warn about extensions to the Fortran  77
  220.                          standard. Default = no.
  221.  
  222.           -help          Print command summary. Default = no.
  223.  
  224.           -hollerith     Warn  about  hollerith  constants  under
  225.                          -port option. Default = yes.
  226.  
  227.           -library       Begin  library  mode:  do  not  warn  if
  228.                          subprograms  in  file  are  defined  but
  229.                          never used. Default = no.
  230.  
  231.           -linebreak     Treat linebreaks in continued statements
  232.                          as space. Default = yes.
  233.  
  234.           -list          Print source listing of program. Default
  235.                          = no.
  236.  
  237.           -novice        Give warnings suitable for novice users.
  238.  
  239.           -portability   Warn about non-portable usages.  Default
  240.                          = no.
  241.  
  242.           -pretty        Give   certain   messages   related   to
  243.                          appearance  of  source  code.  Default =
  244.                          yes.
  245.  
  246.           -project       Create  project  file  (see  explanation
  247.                          below). Default = no.
  248.  
  249.           -pure          Assume functions have no  side  effects.
  250.                          Default = yes.
  251.  
  252.           -sixchar       List any variable names which clash at 6
  253.                          characters length. Default = no.
  254.  
  255.           -symtab        Print out symbol table. Default = no.
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265. FTNCHEK                                                         Page 4
  266.  
  267.  
  268.           -truncation    Check for  possible  truncation  errors.
  269.                          Default = yes.
  270.  
  271.           -verbose       Produce full amount of output. Default =
  272.                          yes.
  273.  
  274.      There are six settings:
  275.  
  276.           -array=n       Set  level  of  strictness  in  checking
  277.                          array arguments of subprograms. Min is 0
  278.                          (least  checking).  Max   is   3   (most
  279.                          checking). Default = 3.
  280.  
  281.           -columns=n     Set maximum line length  to  n  columns.
  282.                          (Beyond  this  is  ignored.) Max is 132.
  283.                          Default = 72.
  284.  
  285.           -common=n      Set  level  of  strictness  in  checking
  286.                          COMMON  blocks.  Min is 0 (no checking).
  287.                          Max is 3 (must be identical). Default  =
  288.                          3.
  289.  
  290.           -include=path  Define a directory to search for include
  291.                          files. Cumulative.
  292.  
  293.           -output=filename Send output to the given file. Default
  294.                          is   to   send  output  to  the  screen.
  295.                          (Default filename extension is '.lis').
  296.  
  297.           -usage=n       Control warnings about unused variables,
  298.                          etc. Min is 0 (no checking). Default = 3
  299.                          (most checking).
  300.  
  301.  
  302.  
  303.  
  304.           When more than one  option  is  used,  they  should  be
  305.  
  306.      separated  by  a  blank space, except on systems such as VMS
  307.  
  308.      where options begin with slash ( / ). No blank spaces may be
  309.  
  310.      placed  around  the  equals sign ( = ) in a setting. Ftnchek
  311.  
  312.      "?" will produce a list of all options and settings.
  313.  
  314.  
  315.           When giving a name of an input file, the  extension  is
  316.  
  317.      optional.  If no extension is given, Ftnchek will first look
  318.  
  319.      for a project file with extension '.prj', and will use  that
  320.  
  321.      if  it  exists. If not, then Ftnchek will look for a Fortran
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331. FTNCHEK                                                         Page 5
  332.  
  333.  
  334.      source file with the extension '.for' for VMS systems,  '.f'
  335.  
  336.      for  Unix  systems.  More than one file name can be given to
  337.  
  338.      Ftnchek, and it will process the modules in all files as  if
  339.  
  340.      they were in a single file.
  341.  
  342.  
  343.           If no filename is given, Ftnchek will read  input  from
  344.  
  345.      the standard input.
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397. FTNCHEK                                                         Page 6
  398.  
  399.  
  400.      3  FTNCHEK OPTIONS
  401.  
  402.  
  403.  
  404.  
  405.           This section provides a  more  detailed  discussion  of
  406.  
  407.      Ftnchek  command-line  options. Options and filenames may be
  408.  
  409.      interspersed on a  command  line.  Each  option  remains  in
  410.  
  411.      effect  from  the  point  it  is  encountered  until  it  is
  412.  
  413.      overridden by a later option. Thus for example, the  listing
  414.  
  415.      may be suppressed for some files and not for others.
  416.  
  417.  
  418.           The  option  names  in  the  following  list   are   in
  419.  
  420.      alphabetical order.
  421.  
  422.  
  423.                                -array=n
  424.  
  425.  
  426.           Controls warnings about mismatches between  actual  and
  427.  
  428.      dummy  subprogram array arguments. (An actual argument is an
  429.  
  430.      argument passed to the subprogram by  the  caller;  a  dummy
  431.  
  432.      argument is an argument received by the subprogram.) Default
  433.  
  434.      =  3.  The  warnings  which  can  be  turned  off  are   for
  435.  
  436.      constructions   that   might   legitimately  be  used  by  a
  437.  
  438.      knowledgeable   programmer,   but   that   often    indicate
  439.  
  440.      programming errors.
  441.  
  442.  
  443.           The meanings of the setting values are as follows:
  444.  
  445.          0: only the warnings noted below.
  446.  
  447.          1: give warnings if the arguments differ in their number
  448.             of  dimensions, or if the actual argument is an array
  449.             element while the dummy argument is a whole array.
  450.  
  451.          2: give warnings if the arguments are both  arrays,  but
  452.             differ in size.
  453.  
  454.          3: give both types of warnings.
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463. FTNCHEK                                                         Page 7
  464.  
  465.  
  466.           Note: no warning is ever given if the  actual  argument
  467.  
  468.      is  an  array  element  while the dummy argument is a scalar
  469.  
  470.      variable, and a warning is always given regardless  of  this
  471.  
  472.      setting  if  the actual argument is an array while the dummy
  473.  
  474.      argument is a scalar variable, or if the actual argument  is
  475.  
  476.      a  scalar variable or expression while the dummy argument is
  477.  
  478.      an array. Variable-dimensioned arrays match any array size.
  479.  
  480.  
  481.                               -calltree
  482.  
  483.  
  484.           Causes Ftnchek to print out the call structure  of  the
  485.  
  486.      complete  program in the form of a tree. The tree is printed
  487.  
  488.      out starting from the main program, which is listed  on  the
  489.  
  490.      first  line at the left margin. Then on the following lines,
  491.  
  492.      each routine called by the main program is listed,  indented
  493.  
  494.      a  few  spaces,  followed  by  the  subtree starting at that
  495.  
  496.      routine. Default = no.
  497.  
  498.  
  499.           If a routine is called by more than one other  routine,
  500.  
  501.      its  call  subtree  is  printed  only  the  first time it is
  502.  
  503.      encountered. Later calls give only the routine name and  the
  504.  
  505.      notice "(see above)".
  506.  
  507.  
  508.           Note that the call tree will be incomplete  if  any  of
  509.  
  510.      the  input  files  are  project  files  that were created in
  511.  
  512.      -library mode. See the discussion of project files below.
  513.  
  514.  
  515.           Technical points: Each list of  routines  called  by  a
  516.  
  517.      given  routine  is printed in alphabetical order. If no main
  518.  
  519.      program is found, a report to that effect  is  printed  out,
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529. FTNCHEK                                                         Page 8
  530.  
  531.  
  532.      and  no  call tree is printed. If multiple main programs are
  533.  
  534.      found, the call tree of each is printed separately.
  535.  
  536.  
  537.           Now that Ftnchek recognizes the call tree structure  of
  538.  
  539.      a  program,  its  checking behavior is somewhat altered from
  540.  
  541.      previous versions, which checked the calls of every  routine
  542.  
  543.      by every other routine, regardless of whether those routines
  544.  
  545.      could ever actually be invoked at run time. Now, if  a  file
  546.  
  547.      is  read with the -library flag in effect, the calls made by
  548.  
  549.      a routine in that file will be checked only if  the  calling
  550.  
  551.      routine is in the main program's call tree. Likewise, COMMON
  552.  
  553.      declarations in a library file will only be checked  if  the
  554.  
  555.      routine  is  in  the  call tree. If the -library flag is not
  556.  
  557.      set, Ftnchek will  check  all  inter-module  calls  and  all
  558.  
  559.      common  declarations,  as  it  did formerly. (If there is no
  560.  
  561.      main program anywhere in the set of files that  Ftnchek  has
  562.  
  563.      read,  so  that there is no call tree, then library routines
  564.  
  565.      will be checked if they are called by  any  routine  in  the
  566.  
  567.      complete set of files.)
  568.  
  569.  
  570.                               -columns=n
  571.  
  572.  
  573.           Set maximum statement length to n columns. (Beyond this
  574.  
  575.      is  ignored.)  This setting is provided to allow checking of
  576.  
  577.      programs which may violate the Fortran standard limit of  72
  578.  
  579.      columns  for  the  length  of  a statement. According to the
  580.  
  581.      standard, all characters past column 72 are ignored. If this
  582.  
  583.      setting is used when the -f77 option is in effect, a warning
  584.  
  585.      will be given for any overlength lines that  are  processed.
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595. FTNCHEK                                                         Page 9
  596.  
  597.  
  598.      Max is 132. Default = 72.
  599.  
  600.  
  601.                               -common=n
  602.  
  603.  
  604.           This setting  varies  the  strictness  of  checking  of
  605.  
  606.      COMMON blocks. Default = 3.
  607.  
  608.  
  609.           The different levels are:
  610.  
  611.          0: no checking.
  612.  
  613.          1:  in  each  declaration  of  a  given  COMMON   block,
  614.             corresponding  memory  locations  must  agree in data
  615.             type.
  616.  
  617.          2: also warn if different declarations of the same block
  618.             are not equal in total length.
  619.  
  620.          3: corresponding variables  in  each  declaration  of  a
  621.             block must agree in data type and (if arrays) in size
  622.             and number of dimensions.
  623.  
  624.  
  625.                                -declare
  626.  
  627.  
  628.           If this flag is set, all identifiers whose datatype  is
  629.  
  630.      not  declared  in  each  module will be listed. This flag is
  631.  
  632.      useful for helping to find misspelled variable  names,  etc.
  633.  
  634.      The  same  listing  will  be given if the module contains an
  635.  
  636.      IMPLICIT NONE statement. Default = no.
  637.  
  638.  
  639.                               -division
  640.  
  641.  
  642.           This switch is provided to help  users  spot  potential
  643.  
  644.      division by zero problems. If this switch is selected, every
  645.  
  646.      division except by  a  constant  will  be  flagged.  (It  is
  647.  
  648.      assumed that the user is intelligent enough not to divide by
  649.  
  650.      a constant which is equal to zero!) Default = no.
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661. FTNCHEK                                                        Page 10
  662.  
  663.  
  664.                                -extern
  665.  
  666.  
  667.           Causes  Ftnchek  to  report  whether  any   subprograms
  668.  
  669.      invoked  by  the  program are never defined, or are multiply
  670.  
  671.      defined. Ordinarily, if Ftnchek is being run on  a  complete
  672.  
  673.      program,  each subprogram other than the intrinsic functions
  674.  
  675.      should be defined once and only  once  somewhere.  Turn  off
  676.  
  677.      this  switch  if  you  just  want to check a subset of files
  678.  
  679.      which form part of a larger complete program,  or  to  check
  680.  
  681.      all  at  once  a  number of unrelated files which might each
  682.  
  683.      contain an unnamed main program. Subprogram  arguments  will
  684.  
  685.      still be checked for correctness. Default = yes.
  686.  
  687.  
  688.                                  -f77
  689.  
  690.  
  691.           Use  this  flag  to  catch  language  extensions  which
  692.  
  693.      violate  the  Fortran 77 standard. Such extensions may cause
  694.  
  695.      your program not to be portable. Examples include the use of
  696.  
  697.      underscores  in  variable  names; variable names longer than
  698.  
  699.      six characters; statement lines longer than  72  characters;
  700.  
  701.      and   nonstandard  statements  such  as  the  DO  ...  ENDDO
  702.  
  703.      structure. Ftnchek does not report on the use  of  lowercase
  704.  
  705.      letters. Default=no.
  706.  
  707.  
  708.                                 -help
  709.  
  710.  
  711.           This command  is  identical  in  function  to  the  "?"
  712.  
  713.      argument,  and is provided simply as a convenience for those
  714.  
  715.      systems in which the question mark has  special  meaning  to
  716.  
  717.      the command interpreter. Default = no.
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727. FTNCHEK                                                        Page 11
  728.  
  729.  
  730.                               -hollerith
  731.  
  732.  
  733.           Hollerith   constants   (other   than   within   format
  734.  
  735.      specifications)   are   a  source  of  possible  portability
  736.  
  737.      problems, so when the -portability  flag  is  set,  warnings
  738.  
  739.      about  them  will  be  produced.  If  your program uses many
  740.  
  741.      hollerith constants, these warnings can obscure  other  more
  742.  
  743.      serious  warnings.  So  you  can  set  this  flag to "no" to
  744.  
  745.      suppress the warnings about holleriths.  This  flag  has  no
  746.  
  747.      effect  when  the -portability flag is turned off. Default =
  748.  
  749.      yes.
  750.  
  751.  
  752.                               -include=n
  753.  
  754.  
  755.           Specifies  a  directory  to  be  searched   for   files
  756.  
  757.      specified  by  INCLUDE statements. Unlike other command-line
  758.  
  759.      options, this setting is cumulative; that is, if it is given
  760.  
  761.      more  than  once on the command line, all the directories so
  762.  
  763.      specified are placed on a list that will be searched in  the
  764.  
  765.      same  order  as  they  are given. The order in which Ftnchek
  766.  
  767.      searches  for  a  file  to  be  included  is:  the   current
  768.  
  769.      directory;  the  directory specified by environment variable
  770.  
  771.      FTNCHEK_INCLUDE if any; the  directories  specified  by  any
  772.  
  773.      -include  options;  the  directory  specified by environment
  774.  
  775.      variable INCLUDE;  and  finally  in  a  standard  systemwide
  776.  
  777.      directory  (/usr/include  for Unix, SYS$LIBRARY for VMS, and
  778.  
  779.      \include for MSDOS).
  780.  
  781.  
  782.                                -library
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793. FTNCHEK                                                        Page 12
  794.  
  795.  
  796.           This switch is used when a number  of  subprograms  are
  797.  
  798.      contained  in  a  file,  but not all of them are used by the
  799.  
  800.      application. Normally, Ftnchek warns you if any  subprograms
  801.  
  802.      are  defined but never used. This switch will suppress these
  803.  
  804.      warnings. Default = no.
  805.  
  806.  
  807.                               -linebreak
  808.  
  809.  
  810.           Normally, when scanning a statement which is  continued
  811.  
  812.      onto  the next line, Ftnchek treats the end of the line as a
  813.  
  814.      space. This behavior is the same as for Pascal  and  C,  and
  815.  
  816.      also corresponds to how humans normally would read and write
  817.  
  818.      programs.  However,  occasionally  one  would  like  to  use
  819.  
  820.      Ftnchek to check a program in which identifiers and keywords
  821.  
  822.      are split across lines,  for  instance  programs  which  are
  823.  
  824.      produced   using   a   preprocessor.   Choosing  the  option
  825.  
  826.      -nolinebreak will cause Ftnchek to skip over the end of line
  827.  
  828.      and  also  any  leading space on the continuation line (from
  829.  
  830.      the continuation mark up to the first  nonspace  character).
  831.  
  832.      Default = yes, i.e. treat linebreaks as space. Default = no.
  833.  
  834.  
  835.           Note that in nolinebreak mode, if token pairs requiring
  836.  
  837.      intervening  space  (for  instance,  GOTO 100) are separated
  838.  
  839.      only by a linebreak, they will be rejoined.
  840.  
  841.  
  842.           Also, tokens  requiring  more  than  one  character  of
  843.  
  844.      lookahead  for  the  resolution  of  ambiguities must not be
  845.  
  846.      split across lines. In particular, a  complex  constant  may
  847.  
  848.      not be split across a line.
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859. FTNCHEK                                                        Page 13
  860.  
  861.  
  862.                                 -list
  863.  
  864.  
  865.           Specifies that a listing of the Fortran program  is  to
  866.  
  867.      be  printed  out  with  line  numbers. If Ftnchek detects an
  868.  
  869.      error, the error message follows the  program  line  with  a
  870.  
  871.      caret  (  ^  )  specifying  the location of the error. If no
  872.  
  873.      source listing was requested, Ftnchek will still  print  out
  874.  
  875.      any line containing an error, to aid the user in determining
  876.  
  877.      where the error occurred. Default = no.
  878.  
  879.  
  880.                                -novice
  881.  
  882.  
  883.           This flag is intended  to  provide  additional  helpful
  884.  
  885.      output  for  beginners. At this time, the only extra message
  886.  
  887.      it provides is a comment that any function that is used  but
  888.  
  889.      not defined anywhere might be an array which the user forgot
  890.  
  891.      to declare in a DIMENSION statement (since the syntax of  an
  892.  
  893.      array   reference   is  the  same  as  that  of  a  function
  894.  
  895.      reference). Default = yes.
  896.  
  897.  
  898.           In earlier versions of Ftnchek, this option could  take
  899.  
  900.      on various numerical values, as a way of controlling various
  901.  
  902.      classes of  warnings.  These  warnings  are  now  controlled
  903.  
  904.      individually  by  their  own  flags.  Novice  level 1 is now
  905.  
  906.      handled by the -array flag; level  2  has  been  eliminated;
  907.  
  908.      level 3 is equivalent now to setting -novice to yes; level 4
  909.  
  910.      is handled by the -impure flag.
  911.  
  912.  
  913.                               -output=n
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925. FTNCHEK                                                        Page 14
  926.  
  927.  
  928.           This setting is provided  for  convenience  on  systems
  929.  
  930.      which do not allow easy redirection of output from programs.
  931.  
  932.      When this  setting  is  given,  the  output  which  normally
  933.  
  934.      appears  on  the  screen  will  be sent instead to the named
  935.  
  936.      file. Note, however,  that  operational  errors  of  Ftnchek
  937.  
  938.      itself (e.g. out of space or cannot open file) will still be
  939.  
  940.      sent to the  screen.  The  extension  for  the  filename  is
  941.  
  942.      optional, and if no extension is given, the extension '.lis'
  943.  
  944.      will be used.
  945.  
  946.  
  947.                              -portability
  948.  
  949.  
  950.           Ftnchek  will  give   warnings   for   a   variety   of
  951.  
  952.      non-portable usages. These include the use of tabs except in
  953.  
  954.      comments or inside strings, the use of hollerith  constants,
  955.  
  956.      and  the equivalencing of variables of different data types.
  957.  
  958.      This option does not produce warnings for violations of  the
  959.  
  960.      Fortran  77  standard,  which  may  also  cause  portability
  961.  
  962.      problems. To catch those, use the -f77 option. Default = no.
  963.  
  964.  
  965.                                -pretty
  966.  
  967.  
  968.           Controls certain messages related to the appearance  of
  969.  
  970.      the  source code. These warn about things that might in some
  971.  
  972.      cases be deceptive to  the  reader.  At  present,  the  only
  973.  
  974.      warning  that  is controlled by this flag refers to comments
  975.  
  976.      that are interspersed among  the  continuation  lines  of  a
  977.  
  978.      statement. Default = yes.
  979.  
  980.  
  981.                                -project
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991. FTNCHEK                                                        Page 15
  992.  
  993.  
  994.           Ftnchek will create a project  file  from  each  source
  995.  
  996.      file that is input while this flag is in effect. The project
  997.  
  998.      file will be given the same name as the input file, but with
  999.  
  1000.      the  extension  '.f' or '.for' replaced by '.prj'. (If input
  1001.  
  1002.      is  from  standard  input,  the  project   file   is   named
  1003.  
  1004.      ftnchek.prj.) Default = no.
  1005.  
  1006.  
  1007.           A project file contains a summary of  information  from
  1008.  
  1009.      the  source  file,  for  use  in  checking  agreement  among
  1010.  
  1011.      FUNCTION, SUBROUTINE,  and  COMMON  block  usages  in  other
  1012.  
  1013.      files.  It  allows  incremental  checking,  which saves time
  1014.  
  1015.      whenever you have a large set  of  files  containing  shared
  1016.  
  1017.      subroutines,  most  of  which  seldom  change.  You  can run
  1018.  
  1019.      Ftnchek once on  each  file  with  the  -project  flag  set,
  1020.  
  1021.      creating  the  project files. Usually you would also set the
  1022.  
  1023.      -library and -noextern  flags  at  this  time,  to  suppress
  1024.  
  1025.      messages  relating  to  consistency  with  other files. Only
  1026.  
  1027.      error messages pertaining to each file  by  itself  will  be
  1028.  
  1029.      printed  at this time. Thereafter, run Ftnchek without these
  1030.  
  1031.      flags  on  all  the  project  files   together,   to   check
  1032.  
  1033.      consistency among the different files. All messages internal
  1034.  
  1035.      to the individual files will now be  omitted.  Only  when  a
  1036.  
  1037.      file  is altered will a new project file need to be made for
  1038.  
  1039.      it.
  1040.  
  1041.  
  1042.           Project  files  contain  only  information  needed  for
  1043.  
  1044.      checking  agreement between files. This means that a project
  1045.  
  1046.      file is of no use if all modules of the complete program are
  1047.  
  1048.      contained in a single file.
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057. FTNCHEK                                                        Page 16
  1058.  
  1059.  
  1060.           Ordinarily, project files should be  created  with  the
  1061.  
  1062.      -library flag in effect. In this mode, the information saved
  1063.  
  1064.      in the project file consists of all subprogram declarations,
  1065.  
  1066.      all  subprogram  invocations not resolved by declarations in
  1067.  
  1068.      the same  file,  and  one  instance  of  each  COMMON  block
  1069.  
  1070.      declaration.  This  is  the  minimum  amount  of information
  1071.  
  1072.      needed to check agreement between  files.  Of  course,  this
  1073.  
  1074.      means  that  the  calling  hierarchy  among routines defined
  1075.  
  1076.      within  the  file  is  lost.  Normally  the  loss  of   this
  1077.  
  1078.      information  is  unimportant.  If  you  wish  to retain this
  1079.  
  1080.      information for some reason, you can create the project file
  1081.  
  1082.      with  the  -library  flag  turned off. In this mode, Ftnchek
  1083.  
  1084.      saves, besides the information listed above, one  invocation
  1085.  
  1086.      of each subprogram by any other subprogram in the same file,
  1087.  
  1088.      and all common  block  declarations.  This  means  that  the
  1089.  
  1090.      project file will be larger than necessary, and that when it
  1091.  
  1092.      is read in, Ftnchek may repeat some inter-module checks that
  1093.  
  1094.      it already did when the project file was created.
  1095.  
  1096.  
  1097.           Because of the loss of information entailed by creating
  1098.  
  1099.      a  project  file  with the -library flag in effect, whenever
  1100.  
  1101.      that project file is read in later, it will be treated as  a
  1102.  
  1103.      library  file  regardless  of  the  current  setting  of the
  1104.  
  1105.      -library flag. On the other hand,  a  project  file  created
  1106.  
  1107.      with  library mode turned off can be read in later in either
  1108.  
  1109.      mode.
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123. FTNCHEK                                                        Page 17
  1124.  
  1125.  
  1126.           Naturally, when the -project flag is set, Ftnchek  will
  1127.  
  1128.      not read project files as input.
  1129.  
  1130.  
  1131.           Here is an example of how to use the Unix make  utility
  1132.  
  1133.      to  automatically  create  a  new project file each time the
  1134.  
  1135.      corresponding source file is altered, and to check  the  set
  1136.  
  1137.      of  files  for consistency. The example assumes that a macro
  1138.  
  1139.      OBJS has been defined which lists all the  names  of  object
  1140.  
  1141.      files  to be linked together to form the complete executable
  1142.  
  1143.      program.
  1144.  
  1145.          # tell make what a project file suffix is
  1146.          .SUFFIXES: .prj
  1147.  
  1148.          # tell make how to create a .prj file from a .f file
  1149.          .f.prj:
  1150.                  ftnchek -project -noextern -library $<
  1151.  
  1152.          # set up macro PRJS containing project filenames
  1153.          PRJS= $(OBJS:.o=.prj)
  1154.  
  1155.          # "make check" will check everything that has been changed.
  1156.          check: $(PRJS)
  1157.                  ftnchek $(PRJS)
  1158.  
  1159.  
  1160.                                 -pure
  1161.  
  1162.  
  1163.           Assume functions are "pure", i.e., they will  not  have
  1164.  
  1165.      side  effects by modifying their arguments or variables in a
  1166.  
  1167.      common block. When this flag is in effect, Ftnchek will base
  1168.  
  1169.      its  determination  of  set  and  used  status of the actual
  1170.  
  1171.      arguments on the  assumption  that  arguments  passed  to  a
  1172.  
  1173.      function  are not altered. It will also issue a warning if a
  1174.  
  1175.      function is found to modify any  of  its  arguments  or  any
  1176.  
  1177.      common variables. Default=yes.
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189. FTNCHEK                                                        Page 18
  1190.  
  1191.  
  1192.           When this flag is turned off, actual  arguments  passed
  1193.  
  1194.      to  functions  will  be  handled  the  same  way  as  actual
  1195.  
  1196.      arguments passed to subroutines.  This  means  that  Ftnchek
  1197.  
  1198.      will assume that arguments may be modified by the functions.
  1199.  
  1200.      No warnings will be given if a function  is  found  to  have
  1201.  
  1202.      side  effects.  Because  stricter  checking  is  possible if
  1203.  
  1204.      functions are assumed to be pure, you should turn this  flag
  1205.  
  1206.      off  only  if your program actually uses functions with side
  1207.  
  1208.      effects.
  1209.  
  1210.  
  1211.                                -sixchar
  1212.  
  1213.  
  1214.           One of the goals of the  Ftnchek  program  is  to  help
  1215.  
  1216.      users  to  write  portable  Fortran  programs. One potential
  1217.  
  1218.      source of nonportability is the use of variable  names  that
  1219.  
  1220.      are  longer  than six characters. Some compilers just ignore
  1221.  
  1222.      the extra characters. This behavior could  potentially  lead
  1223.  
  1224.      to two different variables being considered as the same. For
  1225.  
  1226.      instance, variables named AVERAGECOST and  AVERAGEPRICE  are
  1227.  
  1228.      the  same  in the first six characters. If you wish to catch
  1229.  
  1230.      such possible conflicts, use this flag. Default = no.
  1231.  
  1232.  
  1233.                                -symtab
  1234.  
  1235.  
  1236.           A symbol table will be printed  out  for  each  module,
  1237.  
  1238.      listing  all identifiers mentioned in the module. This table
  1239.  
  1240.      gives the name of  each  variable,  its  datatype,  and  the
  1241.  
  1242.      number  of  dimensions for arrays. An asterisk (*) indicates
  1243.  
  1244.      that the variable has been  implicitly  typed,  rather  than
  1245.  
  1246.      being  named  in an explicit type declaration statement. The
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255. FTNCHEK                                                        Page 19
  1256.  
  1257.  
  1258.      table also lists all subprograms invoked by the module,  all
  1259.  
  1260.      COMMON blocks declared, etc. Default = no.
  1261.  
  1262.  
  1263.                              -truncation
  1264.  
  1265.  
  1266.           Warn about possible truncation  (or  roundoff)  errors.
  1267.  
  1268.      Most  of  these  are  related  to  integer  arithmetic.  The
  1269.  
  1270.      warnings enabled when this flag is in effect are: conversion
  1271.  
  1272.      of  a complex or double precision value to single precision;
  1273.  
  1274.      conversion of any real type to integer; use of the result of
  1275.  
  1276.      integer  division where a real result seems intended (namely
  1277.  
  1278.      as an exponent, or if the quotient  is  later  converted  to
  1279.  
  1280.      real);  division  in  an  integer  constant  expression that
  1281.  
  1282.      yields a result of zero; exponentiation of an integer  by  a
  1283.  
  1284.      negative  integer (which yields zero unless the base integer
  1285.  
  1286.      is  1  in  magnitude);  and  use  of  a  non-integer   array
  1287.  
  1288.      subscript, DO index or DO loop bounds. Default=yes.
  1289.  
  1290.  
  1291.           Note: warnings about truncating  type  conversions  are
  1292.  
  1293.      given  only  when the conversion is done automatically, i.e.
  1294.  
  1295.      by an assignment statement. If intrinsic functions  such  as
  1296.  
  1297.      INT are used to perform the conversion, no warning is given.
  1298.  
  1299.  
  1300.                                -usage=n
  1301.  
  1302.  
  1303.           Warn about unused or possible uninitialized  variables.
  1304.  
  1305.      Default=3.
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321. FTNCHEK                                                        Page 20
  1322.  
  1323.  
  1324.           The meanings of the setting values are as follows:
  1325.  
  1326.          0: no warnings.
  1327.  
  1328.          1: warn if variables are (or may be)  used  before  they
  1329.             are set.
  1330.  
  1331.          2: warn if variables are declared or set but never used.
  1332.  
  1333.          3: give both types of warnings.
  1334.  
  1335.  
  1336.           Sometimes Ftnchek makes a mistake about these warnings.
  1337.  
  1338.      Usually  it  errs  on  the side of giving a warning where no
  1339.  
  1340.      problem exists, but in rare cases it may fail to warn  where
  1341.  
  1342.      the  problem  does  exist.  See  the  section  on  bugs  for
  1343.  
  1344.      examples. If variables are equivalenced, the  rule  used  by
  1345.  
  1346.      Ftnchek is that a reference to any variable implies the same
  1347.  
  1348.      reference to  all  variables  it  is  equivalenced  to.  For
  1349.  
  1350.      arrays, the rule is that a reference to any array element is
  1351.  
  1352.      treated as a reference to all elements of the array.
  1353.  
  1354.  
  1355.                                -verbose
  1356.  
  1357.  
  1358.           This option is on by default. Turning  it  off  reduces
  1359.  
  1360.      the  amount  of output relating to normal operation, so that
  1361.  
  1362.      error messages are more apparent. This  option  is  provided
  1363.  
  1364.      for  the  convenience of users who are checking large suites
  1365.  
  1366.      of files.  The  eliminated  output  includes  the  names  of
  1367.  
  1368.      project  files,  and  the  message  reporting that no syntax
  1369.  
  1370.      errors were found. (Some of this output is turned back on by
  1371.  
  1372.      the -list and -symtab options.) Default = yes.
  1373.  
  1374.  
  1375.  
  1376.      3.1  Changing The Defaults
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387. FTNCHEK                                                        Page 21
  1388.  
  1389.  
  1390.           Ftnchek includes a mechanism for changing  the  default
  1391.  
  1392.      values  of  all  options  by defining environment variables.
  1393.  
  1394.      When Ftnchek starts up, it looks in its environment for  any
  1395.  
  1396.      variables  whose  names are composed by prefixing the string
  1397.  
  1398.      FTNCHEK_ onto the uppercased version of the option name.  If
  1399.  
  1400.      such  a  variable is found, its value is used to specify the
  1401.  
  1402.      default for the corresponding switch or setting. In the case
  1403.  
  1404.      of settings (for example, the novice level) the value of the
  1405.  
  1406.      environment variable is read as the default  setting  value.
  1407.  
  1408.      In the case of switches, the default switch will be taken as
  1409.  
  1410.      true or yes unless the environment variable has the value  0
  1411.  
  1412.      or  NO.  Of course, command-line options will override these
  1413.  
  1414.      defaults  the  same  way  as  they  override  the   built-in
  1415.  
  1416.      defaults.
  1417.  
  1418.  
  1419.           Note  that  the  environment  variable  name  must   be
  1420.  
  1421.      constructed  with the full-length option name, which must be
  1422.  
  1423.      in uppercase. For example, to make Ftnchek  print  a  source
  1424.  
  1425.      listing   by   default,   set   the   environment   variable
  1426.  
  1427.      FTNCHEK_LIST to 1 or YES or anything other than 0 or NO. The
  1428.  
  1429.      names FTNCHEK_LIS (not the full option name) or ftnchek_list
  1430.  
  1431.      (lower case) would not be recognized.
  1432.  
  1433.  
  1434.           Here are  some  examples  of  how  to  set  environment
  1435.  
  1436.      variables  on  various  systems.  For  simplicity,  all  the
  1437.  
  1438.      examples set the default -list switch to -YES.
  1439.  
  1440.      1.  Unix, Bourne shell:  $ FTNCHEK_LIST=YES
  1441.                               $ export FTNCHEK_LIST
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453. FTNCHEK                                                        Page 22
  1454.  
  1455.  
  1456.      2.  Unix, C shell:       % setenv FTNCHEK_LIST YES
  1457.  
  1458.      3.  VAX/VMS:             $ DEFINE FTNCHEK_LIST YES
  1459.  
  1460.      4.  MSDOS:               $ SET FTNCHEK_LIST=YES
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519. FTNCHEK                                                        Page 23
  1520.  
  1521.  
  1522.      4  AN EXAMPLE
  1523.  
  1524.  
  1525.  
  1526.  
  1527.           The following simple Fortran  program  illustrates  the
  1528.  
  1529.      messages given by Ftnchek. The program is intended to accept
  1530.  
  1531.      an array of test scores and then compute the average for the
  1532.  
  1533.      series.
  1534.  
  1535.  
  1536.      C       AUTHORS: MIKE MYERS AND LUCIA SPAGNUOLO
  1537.      C       DATE:    MAY 8, 1989
  1538.  
  1539.      C       Variables:
  1540.      C               SCORE -> an array of test scores
  1541.      C               SUM ->   sum of the test scores
  1542.      C               COUNT -> counter of scores read in
  1543.      C               I ->     loop counter
  1544.  
  1545.              REAL FUNCTION COMPAV(SCORE,COUNT)
  1546.                  INTEGER SUM,COUNT,J,SCORE(5)
  1547.  
  1548.                  DO 30 I = 1,COUNT
  1549.                      SUM = SUM + SCORE(I)
  1550.      30          CONTINUE
  1551.                  COMPAV = SUM/COUNT
  1552.              END
  1553.  
  1554.  
  1555.              PROGRAM AVENUM
  1556.      C
  1557.      C                       MAIN PROGRAM
  1558.      C
  1559.      C       AUTHOR:   LOIS BIGBIE
  1560.      C       DATE:     MAY 15, 1990
  1561.      C
  1562.      C       Variables:
  1563.      C               MAXNOS -> maximum number of input values
  1564.      C               NUMS    -> an array of numbers
  1565.      C               COUNT   -> exact number of input values
  1566.      C               AVG     -> average returned by COMPAV
  1567.      C               I       -> loop counter
  1568.      C
  1569.  
  1570.                  PARAMETER(MAXNOS=5)
  1571.                  INTEGER I, COUNT
  1572.                  REAL NUMS(MAXNOS), AVG
  1573.                  COUNT = 0
  1574.                  DO 80 I = 1,MAXNOS
  1575.                      READ (5,*,END=100) NUMS(I)
  1576.                      COUNT = COUNT + 1
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585. FTNCHEK                                                        Page 24
  1586.  
  1587.  
  1588.      80          CONTINUE
  1589.      100         AVG = COMPAV(NUMS, COUNT)
  1590.              END
  1591.  
  1592.  
  1593.  
  1594.  
  1595.           The compiler gives no error messages when this  program
  1596.  
  1597.      is compiled. Yet here is what happens when it is run:
  1598.  
  1599.      $ run average
  1600.      70
  1601.      90
  1602.      85
  1603.      <EOF>
  1604.      $
  1605.  
  1606.  
  1607.      What happened? Why  didn't  the  program  do  anything?  The
  1608.  
  1609.      following  is  the  output  from  Ftnchek when it is used to
  1610.  
  1611.      debug the above program:
  1612.  
  1613.  
  1614.  
  1615. $ ftnchek -list -symtab average
  1616.  
  1617. FTNCHEK Version 2.6 December 1992
  1618.  
  1619. File average.f:
  1620.  
  1621.       1 C       AUTHORS: MIKE MYERS AND LUCIA SPAGNUOLO
  1622.       2 C       DATE:    MAY 8, 1989
  1623.       3
  1624.       4 C       Variables:
  1625.       5 C               SCORE -> an array of test scores
  1626.       6 C               SUM ->   sum of the test scores
  1627.       7 C               COUNT -> counter of scores read in
  1628.       8 C               I ->     loop counter
  1629.       9
  1630.      10         REAL FUNCTION COMPAV(SCORE,COUNT)
  1631.      11             INTEGER SUM,COUNT,J,SCORE(5)
  1632.      12
  1633.      13             DO 30 I = 1,COUNT
  1634.      14                 SUM = SUM + SCORE(I)
  1635.      15 30          CONTINUE
  1636.      16             COMPAV = SUM/COUNT
  1637.                            ^
  1638. Warning near line 16 col 20: integer quotient expr converted to real
  1639.      17         END
  1640.      18
  1641.  
  1642. Module COMPAV: func: real
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651. FTNCHEK                                                        Page 25
  1652.  
  1653.  
  1654.  
  1655. Variables:
  1656.  
  1657.       Name Type Dims     Name Type Dims     Name Type Dims     Name Type Dims
  1658.     COMPAV real         COUNT intg             I intg*            J intg
  1659.      SCORE intg  1        SUM intg
  1660.  
  1661. * Variable not declared. Type has been implicitly defined.
  1662.  
  1663.  
  1664. Variables declared but never referenced in module COMPAV:
  1665.          J
  1666.  
  1667. Variables may be used before set in module COMPAV:
  1668.        SUM
  1669.  
  1670.  
  1671.      19
  1672.      20         PROGRAM AVENUM
  1673.      21 C
  1674.      22 C                       MAIN PROGRAM
  1675.      23 C
  1676.      24 C       AUTHOR:   LOIS BIGBIE
  1677.      25 C       DATE:     MAY 15, 1990
  1678.      26 C
  1679.      27 C       Variables:
  1680.      28 C               MAXNOS -> maximum number of input values
  1681.      29 C               NUMS    -> an array of numbers
  1682.      30 C               COUNT   -> exact number of input values
  1683.      31 C               AVG     -> average returned by COMPAV
  1684.      32 C               I       -> loop counter
  1685.      33 C
  1686.      34
  1687.      35             PARAMETER(MAXNOS=5)
  1688.      36             INTEGER I, COUNT
  1689.      37             REAL NUMS(MAXNOS), AVG
  1690.      38             COUNT = 0
  1691.      39             DO 80 I = 1,MAXNOS
  1692.      40                 READ (5,*,END=100) NUMS(I)
  1693.      41                 COUNT = COUNT + 1
  1694.      42 80          CONTINUE
  1695.      43 100         AVG = COMPAV(NUMS, COUNT)
  1696.      44         END
  1697.  
  1698. Module AVENUM: prog
  1699.  
  1700. External subprograms referenced:
  1701.  
  1702.     COMPAV: real*
  1703.  
  1704. Variables:
  1705.  
  1706.       Name Type Dims     Name Type Dims     Name Type Dims     Name Type Dims
  1707.        AVG real         COUNT intg             I intg        MAXNOS intg*
  1708.       NUMS real  1
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717. FTNCHEK                                                        Page 26
  1718.  
  1719.  
  1720.  
  1721. * Variable not declared. Type has been implicitly defined.
  1722.  
  1723.  
  1724. Variables set but never used in module AVENUM:
  1725.        AVG
  1726.  
  1727.  
  1728.  
  1729.  0 syntax errors detected in file average.f
  1730.  1 warning issued in file average.f
  1731.  
  1732. Subprogram COMPAV:  argument data type mismatch
  1733.   at position 1:
  1734.         Dummy type intg  in module COMPAV line 10 file average.f
  1735.         Actual type real  in module AVENUM line 43 file average.f
  1736.  
  1737.  
  1738.  
  1739.  
  1740.           According to Ftnchek, the  program  contains  variables
  1741.  
  1742.      which may be used before they are assigned an initial value,
  1743.  
  1744.      and variables which are not needed. Ftnchek also  warns  the
  1745.  
  1746.      user  that an integer quotient has been converted to a real.
  1747.  
  1748.      This may assist the user in catching an unintended  roundoff
  1749.  
  1750.      error.  Since the -symtab flag was given, Ftnchek prints out
  1751.  
  1752.      a table containing identifiers from  the  local  module  and
  1753.  
  1754.      their  corresponding  datatype  and  number  of  dimensions.
  1755.  
  1756.      Finally, Ftnchek warns that the function is  not  used  with
  1757.  
  1758.      the proper type of arguments.
  1759.  
  1760.  
  1761.           With Ftnchek's help, we can debug the program.  We  can
  1762.  
  1763.      see that there were the following errors:
  1764.  
  1765.      1.  SUM and COUNT should have been converted to real  before
  1766.          doing the division.
  1767.  
  1768.      2.  SUM should have been initialized to  0  before  entering
  1769.          the loop.
  1770.  
  1771.      3.  AVG was never printed out after being calculated.
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783. FTNCHEK                                                        Page 27
  1784.  
  1785.  
  1786.      4.  NUMS should have been declared INTEGER instead of REAL.
  1787.  
  1788.  
  1789.      We also see that I, not J, should have been declared INTEGER
  1790.  
  1791.      in  function  COMPAV.  Also,  MAXNOS  was  not  declared  as
  1792.  
  1793.      INTEGER, nor COMPAV as REAL, in program  AVENUM.  These  are
  1794.  
  1795.      not  errors,  but  they  may  indicate  carelessness.  As it
  1796.  
  1797.      happened, the default type of these variables coincided with
  1798.  
  1799.      the intended type.
  1800.  
  1801.  
  1802.           Here is the corrected program, and its output when run:
  1803.  
  1804.  
  1805.      C       AUTHORS: MIKE MYERS AND LUCIA SPAGNUOLO
  1806.      C       DATE:    MAY 8, 1989
  1807.      C
  1808.      C       Variables:
  1809.      C               SCORE -> an array of test scores
  1810.      C               SUM ->   sum of the test scores
  1811.      C               COUNT -> counter of scores read in
  1812.      C               I ->     loop counter
  1813.      C
  1814.             REAL FUNCTION COMPAV(SCORE,COUNT)
  1815.                  INTEGER SUM,COUNT,I,SCORE(5)
  1816.      C
  1817.                  SUM = 0
  1818.                  DO 30 I = 1,COUNT
  1819.                      SUM = SUM + SCORE(I)
  1820.      30          CONTINUE
  1821.                  COMPAV = FLOAT(SUM)/FLOAT(COUNT)
  1822.              END
  1823.      C
  1824.      C
  1825.              PROGRAM AVENUM
  1826.      C
  1827.      C                       MAIN PROGRAM
  1828.      C
  1829.      C       AUTHOR:   LOIS BIGBIE
  1830.      C       DATE:     MAY 15, 1990
  1831.      C
  1832.      C       Variables:
  1833.      C               MAXNOS -> maximum number of input values
  1834.      C               NUMS    -> an array of numbers
  1835.      C               COUNT   -> exact number of input values
  1836.      C               AVG     -> average returned by COMPAV
  1837.      C               I       -> loop counter
  1838.      C
  1839.      C
  1840.                  INTEGER MAXNOS
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849. FTNCHEK                                                        Page 28
  1850.  
  1851.  
  1852.                  PARAMETER(MAXNOS=5)
  1853.                  INTEGER I, NUMS(MAXNOS), COUNT
  1854.                  REAL AVG,COMPAV
  1855.                  COUNT = 0
  1856.                  DO 80 I = 1,MAXNOS
  1857.                      READ (5,*,END=100) NUMS(I)
  1858.                      COUNT = COUNT + 1
  1859.      80          CONTINUE
  1860.      100         AVG = COMPAV(NUMS, COUNT)
  1861.                  WRITE(6,*) 'AVERAGE =',AVG
  1862.              END
  1863.  
  1864.      $ run average
  1865.      70
  1866.      90
  1867.      85
  1868.      <EOF>
  1869.      AVERAGE =   81.66666
  1870.      $
  1871.  
  1872.  
  1873.           With Ftnchek's help, our program is a success!
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915. FTNCHEK                                                        Page 29
  1916.  
  1917.  
  1918.      5  INTERPRETING THE OUTPUT
  1919.  
  1920.  
  1921.  
  1922.  
  1923.           Ftnchek will print out four  main  types  of  messages.
  1924.  
  1925.      They are portability warnings, other warnings, informational
  1926.  
  1927.      messages, and syntax errors.  Portability  warnings  specify
  1928.  
  1929.      nonstandard  usages  that  may  not  be  accepted  by  other
  1930.  
  1931.      compilers. Other warning messages  report  potential  errors
  1932.  
  1933.      that  are  not normally flagged by a compiler. Informational
  1934.  
  1935.      messages consist of warnings which may assist  the  user  in
  1936.  
  1937.      the debugging of their Fortran program.
  1938.  
  1939.  
  1940.           Syntax errors are violations of the  Fortran  language.
  1941.  
  1942.      The user should have already eliminated any that are flagged
  1943.  
  1944.      by the Fortran compiler.
  1945.  
  1946.  
  1947.           Ftnchek does not detect all syntax  errors.  Generally,
  1948.  
  1949.      Ftnchek  only does as much local syntactic error checking as
  1950.  
  1951.      is necessary in order for it to work properly.
  1952.  
  1953.  
  1954.           If Ftnchek gives you a syntax error  message  when  the
  1955.  
  1956.      compiler  does  not, it may be because your program contains
  1957.  
  1958.      an extension to standard Fortran which is  accepted  by  the
  1959.  
  1960.      compiler  but  not  by Ftnchek. On a VAX/VMS system, you can
  1961.  
  1962.      use the compiler option /STANDARD to cause the  compiler  to
  1963.  
  1964.      accept  only  standard  Fortran.  On  most Unix or Unix-like
  1965.  
  1966.      systems, this can be accomplished by setting the flag -ansi.
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981. FTNCHEK                                                        Page 30
  1982.  
  1983.  
  1984.           Most error messages are self-explanatory.  Those  which
  1985.  
  1986.      need  a brief explanation are listed below. Please note that
  1987.  
  1988.      any  error  messages  which  begin  with  "oops"  refer   to
  1989.  
  1990.      technical  conditions  and  indicate bugs in Ftnchek or that
  1991.  
  1992.      its resources have been exceeded.
  1993.  
  1994.  
  1995.  
  1996.      The  following  messages  warn  about  possible  portability
  1997.  
  1998.      problems, including common but nonstandard usages:
  1999.  
  2000.  
  2001.        "Nonstandard format item"
  2002.  
  2003.            Ftnchek  will  flag  nonstandard  items  in  a  FORMAT
  2004.            statement  which  may  not  be  compatible  with other
  2005.            systems. Controlled by -f77 option.
  2006.  
  2007.  
  2008.        "Characters past 72 columns"
  2009.  
  2010.            A  statement  has  been  read   which   has   nonblank
  2011.            characters  past  column  72. Standard Fortran ignores
  2012.            all text in those columns, but many compilers do  not.
  2013.            Thus   the  program  may  be  treated  differently  by
  2014.            different compilers. Controlled  by  -f77  option  and
  2015.            -columns setting.
  2016.  
  2017.  
  2018.        "Warning: file contains tabs. May not be portable."
  2019.  
  2020.            Ftnchek expands tabs to be equivalent to spaces up  to
  2021.            the  next  column  which  is  a  multiple  of  8. Some
  2022.            compilers treat  tabs  differently,  and  also  it  is
  2023.            possible  that files sent by electronic mail will have
  2024.            the tabs converted to blanks in  some  way.  Therefore
  2025.            files  containing  tabs  may not be compiled correctly
  2026.            after being transferred. Ftnchek does  not  give  this
  2027.            message if tabs only occur within comments or strings.
  2028.            Controlled by -portability option.
  2029.  
  2030.  
  2031.        "Nonstandard type usage in expression"
  2032.  
  2033.            The program contains an operation such  as  a  logical
  2034.            operation between integers, which is not standard, and
  2035.            may not be acceptable to some compilers.
  2036.  
  2037.  
  2038.        "Common  block  has  mixed  character  and   non-character
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047. FTNCHEK                                                        Page 31
  2048.  
  2049.  
  2050.            variables"
  2051.  
  2052.            The ANSI standard requires that if any variable  in  a
  2053.            COMMON  block  is  of  type  CHARACTER, then all other
  2054.            variables in the same COMMON block  must  also  be  of
  2055.            type CHARACTER. Controlled by -portability option.
  2056.  
  2057.  
  2058.        "Common block has long  data  type  following  short  data
  2059.            type"
  2060.  
  2061.            Some compilers require that if a COMMON block contains
  2062.            mixed  data  types,  all  long  types  (namely  DOUBLE
  2063.            PRECISION and COMPLEX) must precede  all  short  types
  2064.            (namely    INTEGER,    REAL,   etc.)   Controlled   by
  2065.            -portability option.
  2066.  
  2067.  
  2068.        "Unknown intrinsic function"
  2069.  
  2070.            This message warns the user that a name declared in an
  2071.            INTRINSIC statement is unknown to Ftnchek. Probably it
  2072.            is  a  nonstandard  intrinsic  function,  and  so  the
  2073.            program  will  not  be  portable. The function will be
  2074.            treated by Ftnchek as a  user-defined  function.  This
  2075.            warning  is not controlled by the -portability option,
  2076.            since it affects Ftnchek's analysis of the program.
  2077.  
  2078.  
  2079.        "Identifiers which are not unique in first six chars"
  2080.  
  2081.            Warns that two identifiers which  are  longer  than  6
  2082.            characters  do  not differ in first 6 characters. This
  2083.            is  for  portability:  they  may  not  be   considered
  2084.            distinct  by  some  compilers.  Controlled by -sixchar
  2085.            option.
  2086.  
  2087.  
  2088.  
  2089.  
  2090.      The following messages warn of possible errors  (bugs)  that
  2091.  
  2092.      could cause incorrect operation of the program:
  2093.  
  2094.  
  2095.  
  2096.        "Integer quotient expr converted to real"
  2097.  
  2098.            The quotient of two integers  results  in  an  integer
  2099.            type  result, in which the fractional part is dropped.
  2100.            If such an integer expression  involving  division  is
  2101.            later  converted  to a real datatype, it may be that a
  2102.            real type division had been  intended.  Controlled  by
  2103.            -truncation option.
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113. FTNCHEK                                                        Page 32
  2114.  
  2115.  
  2116.        "Integer quotient expr used in exponent"
  2117.  
  2118.            Similarly, if the quotient of two integers is used  as
  2119.            an  exponent,  it  is  quite  likely  that a real type
  2120.            division  was  intended.  Controlled  by   -truncation
  2121.            option.
  2122.  
  2123.  
  2124.        "Real truncated to intg"
  2125.  
  2126.            Ftnchek has detected an assignment statement which has
  2127.            a  real  expression  on  the  right,  but  an  integer
  2128.            variable on the left. The fractional part of the  real
  2129.            value will be lost. If you explicitly convert the real
  2130.            expression to integer using the INT or NINT  intrinsic
  2131.            function,  no  warning  will  be  printed.  A  similar
  2132.            message is printed if a double precision expression is
  2133.            assigned   to   a   single  precision  variable,  etc.
  2134.            Controlled by -truncation option.
  2135.  
  2136.  
  2137.        "Subscript is not integer"
  2138.  
  2139.            Since   array   subscripts   are   normally    integer
  2140.            quantities,  the  use of a non-integer expression here
  2141.            may signal an error. Controlled by -truncation option.
  2142.  
  2143.  
  2144.        "Non-integer DO loop bounds"
  2145.  
  2146.            This warning is only  given  when  the  DO  index  and
  2147.            bounds  are non-integer. Use of non-integer quantities
  2148.            in a DO statement  may  cause  unexpected  errors,  or
  2149.            different   results  on  different  machines,  due  to
  2150.            roundoff effects. Controlled by -truncation option.
  2151.  
  2152.  
  2153.        "DO index is not integer"
  2154.  
  2155.            This warning is only given  when  the  DO  bounds  are
  2156.            integer,  but  the  DO index is not. It may indicate a
  2157.            failure  to  declare  the  index  to  be  an  integer.
  2158.            Controlled by -truncation option.
  2159.  
  2160.  
  2161.        "Possible division by zero"
  2162.  
  2163.            This message is printed out wherever division is  done
  2164.            (except division by a constant). Use it to help locate
  2165.            a runtime division  by  zero  problem.  Controlled  by
  2166.            -division option.
  2167.  
  2168.  
  2169.        "NAME not set when RETURN encountered"
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179. FTNCHEK                                                        Page 33
  2180.  
  2181.  
  2182.            The way that functions in Fortran return a value is by
  2183.            assigning  the value to the name of the function. This
  2184.            message indicates that the function was not assigned a
  2185.            value  before  the  point where a RETURN statement was
  2186.            found. Therefore it  is  possible  that  the  function
  2187.            could return an undefined value.
  2188.  
  2189.  
  2190.        "Variables used before set"
  2191.  
  2192.            This message indicates that an identifier is  used  to
  2193.            compute  a  value  prior  to  its initialization. Such
  2194.            usage may lead to an incorrect value  being  computed,
  2195.            since  its  initial value is not controlled. Given for
  2196.            -usage setting 1 or 3.
  2197.  
  2198.  
  2199.        "Variables may be used before set"
  2200.  
  2201.            Similar to used before set except that Ftnchek is  not
  2202.            able  to  determine its status with certainty. Ftnchek
  2203.            assumes a variable may be used before set if the first
  2204.            usage of the variable occurs prior in the program text
  2205.            to its assignment. Given for -usage setting 1 or 3.
  2206.  
  2207.  
  2208.        "Subprogram NAME: varying length argument lists:"
  2209.  
  2210.            An inconsistency has been found between the number  of
  2211.            dummy  arguments (parameters) a subprogram has and the
  2212.            number of actual arguments given it in an  invocation.
  2213.            Ftnchek  keeps track of all invocations of subprograms
  2214.            (CALL statements and expressions using functions)  and
  2215.            compares  them with the definitions of the subprograms
  2216.            elsewhere in the source  code.  The  Fortran  compiler
  2217.            normally does not catch this type of error.
  2218.  
  2219.  
  2220.     "Subprogram NAME: argument data type mismatch at position n"
  2221.  
  2222.            The subprogram's n-th actual argument (in the CALL  or
  2223.            the  usage of a function) differs in datatype from the
  2224.            n-th dummy argument (in  the  SUBROUTINE  or  FUNCTION
  2225.            declaration).  For  instance,  if  the  user defines a
  2226.            subprogram by
  2227.  
  2228.                 SUBROUTINE SUBA(X)
  2229.                 REAL X
  2230.  
  2231.            and elsewhere invokes SUBA by
  2232.  
  2233.                 CALL SUBA(2)
  2234.  
  2235.            Ftnchek will detect the error. The reason here is that
  2236.            the  number  2  is  integer, not real. The user should
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245. FTNCHEK                                                        Page 34
  2246.  
  2247.  
  2248.            have said
  2249.  
  2250.                 CALL SUBA(2.0)
  2251.  
  2252.            When checking  an  argument  which  is  a  subprogram,
  2253.            Ftnchek  must  be  able  to  determine whether it is a
  2254.            function or a subroutine. The rules used by Ftnchek to
  2255.            do  this  are  as  follows: If the subprogram, besides
  2256.            being passed as an actual argument,  is  also  invoked
  2257.            directly  elsewhere  in the same module, then its type
  2258.            is determined by that usage. If not, then if the  name
  2259.            of  the subprogram does not appear in an explicit type
  2260.            declaration, it is assumed to be a subroutine;  if  it
  2261.            is  explicitly  typed  it  is  taken  as  a  function.
  2262.            Therefore, subroutines passed as actual arguments need
  2263.            only  be  declared  by  an  EXTERNAL  statement in the
  2264.            calling  module,  whereas  functions  must   also   be
  2265.            explicitly  typed  in  order  to avoid generating this
  2266.            error message.
  2267.  
  2268.  
  2269.        "Subprogram invoked inconsistently"
  2270.  
  2271.            Here the mismatch  is  between  the  datatype  of  the
  2272.            subprogram   itself   as  used  and  as  defined.  For
  2273.            instance, if the user declares
  2274.  
  2275.                 INTEGER FUNCTION COUNT(A)
  2276.  
  2277.            and invokes COUNT in another module as
  2278.  
  2279.                 N = COUNT(A)
  2280.  
  2281.            without declaring its datatype,  it  will  default  to
  2282.            real  type, based on the first letter of its name. The
  2283.            calling module should have included the declaration
  2284.  
  2285.                 INTEGER COUNT
  2286.  
  2287.  
  2288.  
  2289.        "Subprogram NAME: argument usage mismatch"
  2290.  
  2291.            Ftnchek detects a possible conflict between the way  a
  2292.            subprogram  uses  an argument and the way in which the
  2293.            argument is supplied to the subprogram.  The  conflict
  2294.            can be one of two types, as outlined below.
  2295.  
  2296.  
  2297.        "Dummy arg is modified, Actual arg is const or expr"
  2298.  
  2299.            A  dummy  argument  is  an  argument  as  named  in  a
  2300.            SUBROUTINE  or  FUNCTION statement and used within the
  2301.            subprogram. An  actual  argument  is  an  argument  as
  2302.            passed  to  a  subroutine  or  function by the caller.
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311. FTNCHEK                                                        Page 35
  2312.  
  2313.  
  2314.            Ftnchek is saying that a dummy argument is modified by
  2315.            the  subprogram, i.e. its value will be changed in the
  2316.            calling  module.  The  corresponding  actual  argument
  2317.            should  not  be a constant or expression, but rather a
  2318.            variable or array element which  can  be  legitimately
  2319.            assigned to. Given for -usage setting 1 or 3.
  2320.  
  2321.  
  2322.        "Dummy arg used before set, Actual arg not set"
  2323.  
  2324.            Here a dummy argument may be used  in  the  subprogram
  2325.            before   having   a   value  assigned  to  it  by  the
  2326.            subprogram. The corresponding actual  argument  should
  2327.            have  a  value  assigned  to it by the caller prior to
  2328.            invoking the subprogram. Given for -usage setting 1 or
  2329.            3.
  2330.  
  2331.  
  2332.        "Common block NAME: varying length"
  2333.  
  2334.            A COMMON block declared in different  subprograms  has
  2335.            different  numbers  of  variables  in  it in different
  2336.            declarations. This is not necessarily an error, but it
  2337.            may indicate that a variable is missing from the list.
  2338.            Note that according to the Fortran 77 standard, it  is
  2339.            an  error  for  named  common  blocks  (but  not blank
  2340.            common)  to  differ  in  length  in  declarations   in
  2341.            different modules. Given for -common setting 2 or 3.
  2342.  
  2343.  
  2344.        "Common block NAME: data type mismatch at position n"
  2345.  
  2346.            The n-th variable in the COMMON block differs in  data
  2347.            type  in  two  different  declarations  of  the COMMON
  2348.            block. By default (common strictness level 3), Ftnchek
  2349.            is  very  picky  about  COMMON  blocks:  the variables
  2350.            listed in them must match exactly  by  data  type  and
  2351.            array   dimensions.   That   is,  the  legal  pair  of
  2352.            declarations in different modules:
  2353.  
  2354.                 COMMON /COM1/ A,B
  2355.  
  2356.            and
  2357.  
  2358.                COMMON /COM1/ A(2)
  2359.  
  2360.            will cause Ftnchek  to  give  warnings  at  strictness
  2361.            level  3.  These two declarations are legal in Fortran
  2362.            since  they  both  declare  two  real  variables.   At
  2363.            strictness  level 1 or 2, no warning would be given in
  2364.            this example, but the warning would be given if  there
  2365.            were  a  data  type  mismatch, for instance, if B were
  2366.            declared INTEGER. Controlled by -common setting.
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377. FTNCHEK                                                        Page 36
  2378.  
  2379.  
  2380.      The following messages refer to local syntax errors:
  2381.  
  2382.  
  2383.  
  2384.        "Syntax error"
  2385.  
  2386.            This means that the parser, which analyzes the Fortran
  2387.            program  into  expressions, statements, etc., has been
  2388.            unable to find a valid interpretation for some portion
  2389.            of  a  statement  in the program. If the compiler does
  2390.            not report a syntax error at the same place, the  most
  2391.            common explanations are: (1) use of a reserved word as
  2392.            an array or character variable (see  Table  2  in  the
  2393.            section entitled "Limitations and Extensions"), or (2)
  2394.            use of an extension to ANSI standard Fortran  that  is
  2395.            not recognized by Ftnchek.
  2396.  
  2397.                 NOTE:  This  message  means  that  the   affected
  2398.            statement   is   not  interpreted.  Therefore,  it  is
  2399.            possible that Ftnchek's subsequent processing will  be
  2400.            in  error,  if  it  depends on any matters affected by
  2401.            this statement (type declarations, etc.).
  2402.  
  2403.  
  2404.        "No path to this statement"
  2405.  
  2406.            Ftnchek will detect statements which  are  ignored  or
  2407.            by-passed because there is no foreseeable route to the
  2408.            statement. For example,  an  unnumbered  statement  (a
  2409.            statement   without   a  statement  label),  occurring
  2410.            immediately after a GOTO statement, cannot possibly be
  2411.            executed.
  2412.  
  2413.  
  2414.        "Statement out of order."
  2415.  
  2416.            Ftnchek will detect statements that  are  out  of  the
  2417.            sequence specified for ANSI standard Fortran-77. Table
  2418.            1 illustrates the allowed sequence  of  statements  in
  2419.            the  Fortran  language.  Statements  which  are out of
  2420.            order  are  nonetheless  interpreted  by  Ftnchek,  to
  2421.            prevent "cascades" of error messages.
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443. FTNCHEK                                                        Page 37
  2444.  
  2445.  
  2446.           --------------------------------------------------------
  2447.                             |               | implicit
  2448.                             |  parameter    |---------------------
  2449.                             |               | other specification
  2450.                   format    |---------------|---------------------
  2451.                    and      |               | statement-function
  2452.                   entry     |  data         |---------------------
  2453.                             |               | executable
  2454.           --------------------------------------------------------
  2455.  
  2456.                                 Table 1
  2457.  
  2458.  
  2459.      The following messages  are  informational  messages,  which
  2460.      probably do not indicate bugs, but may indicate carelessness
  2461.      or oversights during modification of a program.
  2462.  
  2463.  
  2464.  
  2465.        "Continuation follows comment or blank line"
  2466.  
  2467.            Ftnchek issues this warning message to alert the  user
  2468.            that  a  continuation  of  a statement is interspersed
  2469.            with comments, making it easy to overlook.  Controlled
  2470.            by -pretty option.
  2471.  
  2472.  
  2473.        "Declared but never referenced"
  2474.  
  2475.            Detects any identifiers that  were  declared  in  your
  2476.            program  but  were never used, either to be assigned a
  2477.            value or to have their value  accessed.  Variables  in
  2478.            COMMON are excluded. Given for -usage setting 2 or 3.
  2479.  
  2480.  
  2481.        "Variables set but never used"
  2482.  
  2483.            Ftnchek will notify the user when a variable has  been
  2484.            assigned  a  value,  but the variable is not otherwise
  2485.            used in the program.  Usually  this  results  from  an
  2486.            oversight. Given for -usage setting 2 or 3.
  2487.  
  2488.  
  2489.        "Type has been implicitly defined"
  2490.  
  2491.            Ftnchek  will  flag  all  identifiers  that  are   not
  2492.            explicitly  typed  and will show the datatype that was
  2493.            assigned  through  implicit  typing.   This   provides
  2494.            support for users who wish to declare all variables as
  2495.            is required in Pascal or some  other  languages.  This
  2496.            message  is printed only when the -symtab option is in
  2497.            effect. Alternatively, use the -declare  flag  if  you
  2498.            want to get a list of all undeclared variables.
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509. FTNCHEK                                                        Page 38
  2510.  
  2511.  
  2512.        "Possibly it is an array which was not declared"
  2513.  
  2514.            This message refers to a function invocation or to  an
  2515.            argument  type  mismatch,  for  which  the possibility
  2516.            exists that what appears to be a function is  actually
  2517.            meant  to  be  an  array.  If the programmer forgot to
  2518.            dimension an array, references to the  array  will  be
  2519.            interpreted as function invocations. This message will
  2520.            be suppressed if the name in question  appears  in  an
  2521.            EXTERNAL  or  INTRINSIC  statement.  Controlled by the
  2522.            -novice option.
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575. FTNCHEK                                                        Page 39
  2576.  
  2577.  
  2578.      6  LIMITATIONS AND EXTENSIONS
  2579.  
  2580.  
  2581.  
  2582.  
  2583.           Ftnchek accepts ANSI standard Fortran-77 programs  with
  2584.  
  2585.      the following exceptions:
  2586.  
  2587.  
  2588.  
  2589.      Restrictions:
  2590.  
  2591.  
  2592.           Ftnchek is sensitive to blank spaces.  This  encourages
  2593.  
  2594.           the  user  to use good programming style. The rules are
  2595.  
  2596.           similar to Pascal or C where a blank space is  required
  2597.  
  2598.           between  identifiers or keywords and not allowed inside
  2599.  
  2600.           identifiers or keywords. Any keywords  which  occur  in
  2601.  
  2602.           pairs  may  be written as either one or two words, e.g.
  2603.  
  2604.           ELSE IF or ELSEIF. Unlike Pascal and C, Ftnchek  allows
  2605.  
  2606.           blanks  inside  numeric  constants,  except  within the
  2607.  
  2608.           exponent part of E and D form  numbers.  Also,  if  the
  2609.  
  2610.           -nolinebreak  option  is  selected,  the end of line in
  2611.  
  2612.           continued statements is ignored.
  2613.  
  2614.  
  2615.                Complex  constants  are  subject  to   a   special
  2616.  
  2617.           restriction:  they  may not be split across lines, even
  2618.  
  2619.           in -nolinebreak mode.
  2620.  
  2621.  
  2622.                The dummy arguments  in  statement  functions  are
  2623.  
  2624.           treated  like  ordinary  variables of the program. That
  2625.  
  2626.           is, their scope is the  entire  module,  not  just  the
  2627.  
  2628.           statement function definition.
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641. FTNCHEK                                                        Page 40
  2642.  
  2643.  
  2644.                Some  keywords  and  identifiers   are   partially
  2645.  
  2646.           reserved. See Table 2 for details.
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.           The following keywords may be freely used as variables:
  2653.  
  2654.      ASSIGN          BLOCK           BLOCKDATA       BYTE
  2655.      CALL            CHARACTER       COMMON          COMPLEX
  2656.      CONTINUE        DIMENSION       DO              DOUBLE
  2657.      DOUBLEPRECISION ELSE            END             ENDDO
  2658.      ENDIF           ENTRY           EXTERNAL        FILE
  2659.      FUNCTION        GO              IMPLICIT        INCLUDE
  2660.      INTEGER         INTRINSIC       LOGICAL         NAMELIST
  2661.      PAUSE           PRECISION       PROGRAM         REAL
  2662.      SAVE            STOP            SUBROUTINE      THEN
  2663.      TO
  2664.  
  2665.  
  2666.           The following keywords may be used in  scalar  contexts
  2667.      only,  for  example, not as arrays or as character variables
  2668.      used in substring expressions.
  2669.  
  2670.      ACCEPT          BACKSPACE       CLOSE           DATA
  2671.      DOWHILE         ELSEIF          ENDFILE         EQUIVALENCE
  2672.      FORMAT          GOTO            IF              INQUIRE
  2673.      OPEN            PARAMETER       PRINT           READ
  2674.      RETURN          REWIND          TYPE            WRITE
  2675.      WHILE
  2676.  
  2677.                            Table 2
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.      Extensions:
  2687.  
  2688.  
  2689.           Tabs are  permitted,  and  translated  into  equivalent
  2690.  
  2691.           blanks  which  correspond to tab stops every 8 columns.
  2692.  
  2693.           The standard does not recognize tabs.  Note  that  some
  2694.  
  2695.           compilers allow tabs, but treat them differently.
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707. FTNCHEK                                                        Page 41
  2708.  
  2709.  
  2710.                Lower  case  characters  are  permitted,  and  are
  2711.  
  2712.           converted  internally  to  uppercase except in strings.
  2713.  
  2714.           The standard  specifies  upper  case  only,  except  in
  2715.  
  2716.           comments and strings.
  2717.  
  2718.  
  2719.                Hollerith constants are permitted,  in  accordance
  2720.  
  2721.           with  the  ANSI  Manual, appendix C. They should not be
  2722.  
  2723.           used  in  expressions,  or   confused   with   datatype
  2724.  
  2725.           CHARACTER.
  2726.  
  2727.  
  2728.                Statements may be longer than 72 columns  provided
  2729.  
  2730.           that  the  setting  -column  was  used  to increase the
  2731.  
  2732.           limit. According to the standard, all text from columns
  2733.  
  2734.           73  through  80  is  ignored, and no line may be longer
  2735.  
  2736.           than 80 columns.
  2737.  
  2738.  
  2739.                Variable names may be longer than six  characters.
  2740.  
  2741.           The standard specifies six as the maximum.
  2742.  
  2743.  
  2744.                Variable names may contain underscores, which  are
  2745.  
  2746.           treated the same as alphabetic letters. The VMS version
  2747.  
  2748.           of Ftnchek also allows dollar signs in variable  names,
  2749.  
  2750.           but not as the initial character.
  2751.  
  2752.  
  2753.                The DO ... ENDDO control structure  is  permitted.
  2754.  
  2755.           The  syntax  which is recognized is according to either
  2756.  
  2757.           of the following two forms:
  2758.                    DO [label [,]] var = expr , expr [, expr]
  2759.                      ...
  2760.                    END DO
  2761.           or
  2762.                    DO [label [,]] WHILE ( expr )
  2763.                      ...
  2764.                    END DO
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773. FTNCHEK                                                        Page 42
  2774.  
  2775.  
  2776.           where square brackets indicate optional elements.
  2777.  
  2778.  
  2779.                The ACCEPT and TYPE statements (for terminal  I/O)
  2780.  
  2781.           are permitted, with the same syntax as PRINT.
  2782.  
  2783.  
  2784.                Statements may have  any  number  of  continuation
  2785.  
  2786.           lines. The standard allows a maximum of 19.
  2787.  
  2788.  
  2789.                Inline comments,  beginning  with  an  exclamation
  2790.  
  2791.           mark, are permitted.
  2792.  
  2793.  
  2794.                NAMELIST I/O is supported. The syntax is the  same
  2795.  
  2796.           as in VAX/VMS or IBM Fortran.
  2797.  
  2798.  
  2799.                The IMPLICIT  NONE  statement  is  supported.  The
  2800.  
  2801.           meaning  of  this  statement is that all variables must
  2802.  
  2803.           have their data types explicitly declared. Rather  than
  2804.  
  2805.           flag  the  occurrences  of  such  variables with syntax
  2806.  
  2807.           error messages, Ftnchek  waits  till  the  end  of  the
  2808.  
  2809.           module,  and  then  prints out a list of all undeclared
  2810.  
  2811.           variables.
  2812.  
  2813.  
  2814.                Data types INTEGER, REAL, COMPLEX, and LOGICAL are
  2815.  
  2816.           allowed  to  have  an  optional length specification in
  2817.  
  2818.           type declarations. For instance, REAL*8 means an 8-byte
  2819.  
  2820.           floating  point  data  type.  The  REAL*8  datatype  is
  2821.  
  2822.           interpreted  by  Ftnchek  as   equivalent   to   DOUBLE
  2823.  
  2824.           PRECISION. Ftnchek ignores length specifications on all
  2825.  
  2826.           other types. The standard allows a length specification
  2827.  
  2828.           only for CHARACTER data.
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839. FTNCHEK                                                        Page 43
  2840.  
  2841.  
  2842.                Ftnchek  permits  the  INCLUDE  statement,   which
  2843.  
  2844.           causes  inclusion  of  the  text of the given file. The
  2845.  
  2846.           syntax is
  2847.  
  2848.                    INCLUDE 'filename'
  2849.  
  2850.           When compiled for VMS, Ftnchek will  assume  a  default
  2851.  
  2852.           extension  of '.for' if no filename extension is given.
  2853.  
  2854.           Also for compatibility with VMS, the VMS version allows
  2855.  
  2856.           the  qualifier  [NO]LIST  following  the  filename,  to
  2857.  
  2858.           control the listing of the included file. There  is  no
  2859.  
  2860.           support for including VMS text modules.
  2861.  
  2862.  
  2863.                At this time, diagnostic output relating to  items
  2864.  
  2865.           contained in include files is minimal. Only information
  2866.  
  2867.           about the location in the include file is given.  There
  2868.  
  2869.           is  no  traceback  giving  the parent file(s), although
  2870.  
  2871.           usually this can be inferred from the context.
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905. FTNCHEK                                                        Page 44
  2906.  
  2907.  
  2908.      7  NEW FEATURES
  2909.  
  2910.  
  2911.  
  2912.               Here are the changes from Version  2.5  to  Version
  2913.          2.6:
  2914.  
  2915.      1.  The following bugs in Version 2.5 were  fixed:  Overflow
  2916.          of   large  integer  parameter  values.  Inline  comment
  2917.          character mistaken in difficult contexts. Unnamed  BLOCK
  2918.          DATA  modules  treated as main programs. DATA implied-do
  2919.          statements  sometimes  parsed   incorrectly.   Size   of
  2920.          variable-dimensioned    arrays    sometimes   calculated
  2921.          incorrectly. Documented bug number  1  in  the  previous
  2922.          documentation, which caused a used-before-set warning if
  2923.          a function modifies an argument,  has  been  fixed.  The
  2924.          warning is now controlled by the -impure option.
  2925.  
  2926.      2.  New features: Support for NAMELIST I/O.  Directories  to
  2927.          be  searched  for  include  files  can be specified. All
  2928.          keyword  pairs  are  now  accepted  in  both  split   or
  2929.          single-word  form.  PARAMETER  definitions  may  contain
  2930.          intrinsic  functions.   Cross-module   checking   within
  2931.          library  files  is  now  limited  to modules in the call
  2932.          tree. BYTE data type is accepted (treated  as  INTEGER).
  2933.          VMS  and  MS-DOS versions no longer require command-line
  2934.          flags having the "/" prefix to be separated by space.
  2935.  
  2936.      3.  New command-line flags added and existing flags modified
  2937.          for  better  control  of  error  and  warning reporting.
  2938.          Affected  flags  are:  "-array",  "-calltree",  "-help",
  2939.          "-hollerith",  "-novice",  "-pretty", "-pure", "-trunc",
  2940.          "-usage", and the "-no" prefix to  turn  functions  off.
  2941.          See documentation sections for full explanation of these
  2942.          flags.
  2943.  
  2944.      4.  New  warnings:  if  array  subscript  or  DO  index   is
  2945.          non-integer; if constant value of 0 results from integer
  2946.          division  or  exponentiation;  and  if  data   type   of
  2947.          expression  in  logical  or  arithmetic  IF statement is
  2948.          improper. The warning  of  "variable  declared  but  not
  2949.          used"  is  now  suppressed when the declaration is in an
  2950.          include file. A warning is  now  given  under  the  -f77
  2951.          option if the standard limit of 19 continuation lines is
  2952.          exceeded.
  2953.  
  2954.  
  2955.  
  2956.           Here are the changes from Version 2.4 to Version 2.5:
  2957.  
  2958.      1.  The name was changed from Forchek to Ftnchek,  to  avoid
  2959.          confusion   with   a  similar  program  named  Forcheck,
  2960.          developed earlier at Leiden University.
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971. FTNCHEK                                                        Page 45
  2972.  
  2973.  
  2974.      2.  Some bugs were fixed: Version 2.4 incorrectly  processed
  2975.          DO  index  variable  names beginning with D or E. It did
  2976.          not support the +kP format descriptor. The  VMS  version
  2977.          failed  to  accept  the NOSPANBLOCKS, READONLY or SHARED
  2978.          keywords in OPEN statements. Also,  a  couple  of  error
  2979.          messages were improved.
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037. FTNCHEK                                                        Page 46
  3038.  
  3039.  
  3040.      8  BUGS
  3041.  
  3042.  
  3043.  
  3044.  
  3045.           Ftnchek still  has  much  room  for  improvement.  Your
  3046.  
  3047.      feedback  is appreciated. We want to know about any bugs you
  3048.  
  3049.      notice. Bugs include not only cases in which Ftnchek  issues
  3050.  
  3051.      an  error message where no error exists, but also if Ftnchek
  3052.  
  3053.      fails to issue a warning when it ought  to.  Note,  however,
  3054.  
  3055.      that  Ftnchek  is  not  intended to catch all syntax errors.
  3056.  
  3057.      Also, it is not considered  a  bug  for  a  variable  to  be
  3058.  
  3059.      reported as used before set, if the reason is that the usage
  3060.  
  3061.      of the variable occurs  prior  in  the  text  to  where  the
  3062.  
  3063.      variable  is set. For instance, this could occur when a GOTO
  3064.  
  3065.      causes execution to loop backward to some previously skipped
  3066.  
  3067.      statements.  Ftnchek  does not analyze the program flow, but
  3068.  
  3069.      assumes that statements occurring earlier in  the  text  are
  3070.  
  3071.      executed before the following ones.
  3072.  
  3073.  
  3074.           We especially want to know if Ftnchek crashes  for  any
  3075.  
  3076.      reason.  It  is not supposed to crash, even on programs with
  3077.  
  3078.      syntax  errors.  Suggestions  are  welcomed  for  additional
  3079.  
  3080.      features  which  you  would  find  useful. Tell us if any of
  3081.  
  3082.      Ftnchek's messages are  incomprehensible.  Comments  on  the
  3083.  
  3084.      readability and accuracy of this document are also welcome.
  3085.  
  3086.  
  3087.           You may also suggest support for additional  extensions
  3088.  
  3089.      to  the  Fortran language. These will be included only if it
  3090.  
  3091.      is felt that the extensions are sufficiently widely accepted
  3092.  
  3093.      by compilers.
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103. FTNCHEK                                                        Page 47
  3104.  
  3105.  
  3106.           If you find a bug in Ftnchek, first consult the list of
  3107.  
  3108.      known  bugs  below  to  see if it has already been reported.
  3109.  
  3110.      Also check the section entitled "Limitations and Extensions"
  3111.  
  3112.      above for restrictions that could be causing the problem. If
  3113.  
  3114.      you do not find the problem documented in either place, then
  3115.  
  3116.      send a report including
  3117.  
  3118.           1.  The operating system and CPU type on which  Ftnchek
  3119.               is running.
  3120.  
  3121.           2.  The version of Ftnchek.
  3122.  
  3123.           3.  A brief description of the bug.
  3124.  
  3125.           4.  If possible, a small  sample  program  showing  the
  3126.               bug.
  3127.  
  3128.  
  3129.      The report  should  be  sent  to  either  of  the  following
  3130.  
  3131.      addresses:
  3132.  
  3133.  
  3134.            MONIOT@FORDMULC.BITNET
  3135.  
  3136.            moniot@mary.fordham.edu
  3137.  
  3138.  
  3139.  
  3140.           Highest priority will be  given  to  bugs  which  cause
  3141.  
  3142.      Ftnchek to crash. Bugs involving incorrect warnings or error
  3143.  
  3144.      messages may take longer to fix.
  3145.  
  3146.  
  3147.           Certain  problems  that  arise  when   checking   large
  3148.  
  3149.      programs  can  be  fixed by increasing the sizes of the data
  3150.  
  3151.      areas in Ftnchek. (These problems are generally signaled  by
  3152.  
  3153.      error  messages  beginning with "Oops".) The simplest way to
  3154.  
  3155.      increase the table sizes is by recompiling Ftnchek with  the
  3156.  
  3157.      LARGEMACHINE  macro  name  defined. Consult the makefile for
  3158.  
  3159.      the method of doing this.
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169. FTNCHEK                                                        Page 48
  3170.  
  3171.  
  3172.           The following is a list of known bugs.
  3173.  
  3174.      1.  Bug:  Used-before-set  message  is  suppressed  for  any
  3175.          variable   which  is  used  as  the  loop  index  in  an
  3176.          implied-do loop, even if it  was  in  fact  used  before
  3177.          being  set  in  some  earlier  statement.  For  example,
  3178.          consider J in the statement
  3179.  
  3180.                WRITE(5,*) (A(J), J=1,10)
  3181.  
  3182.  
  3183.               Here Ftnchek parses the I/O expression, A(J), where
  3184.          J  is used, before it parses the implied loop where J is
  3185.          set. Normally this  would  cause  Ftnchek  to  report  a
  3186.          spurious  used-before-set  warning  for  J.  Since  this
  3187.          report is usually in error and occurs  fairly  commonly,
  3188.          Ftnchek suppresses the warning for J altogether.
  3189.  
  3190.               Prognosis: A future version of Ftnchek  is  planned
  3191.          which will handle implied-do loops correctly.
  3192.  
  3193.      2.  Bug:   Variables   used   (not    as    arguments)    in
  3194.          statement-function  subprograms  do not have their usage
  3195.          status updated when the statement function is invoked.
  3196.  
  3197.               Prognosis: To be  fixed  in  a  future  version  of
  3198.          Ftnchek.
  3199.  
  3200.      3.  Bug: Length declarations of character variables are  not
  3201.          correctly  handled in COMMON block checking. Nonstandard
  3202.          length declarations of other data types, except  REAL*8,
  3203.          are also not handled correctly.
  3204.  
  3205.               Prognosis: We hope to fix this  soon,  possibly  in
  3206.          the next release.
  3207.  
  3208.  
  3209.      Ftnchek was designed by  Dr.  Robert  Moniot,  professor  at
  3210.  
  3211.      Fordham  University,  College  at Lincoln Center. During the
  3212.  
  3213.      academic  year  of  1988-1989,  Michael  Myers   and   Lucia
  3214.  
  3215.      Spagnuolo  developed  the  program  to  perform the variable
  3216.  
  3217.      usage checks. During the following year it was augmented  by
  3218.  
  3219.      Lois  Bigbie  to check subprogram arguments and COMMON block
  3220.  
  3221.      declarations. Brian Downing assisted with the implementation
  3222.  
  3223.      of  the INCLUDE statement. Additional features will be added
  3224.  
  3225.      as time permits.
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235. FTNCHEK                                                        Page 49
  3236.  
  3237.  
  3238.           We would like to thank Markus Draxler of the University
  3239.  
  3240.      of  Stuttgart,  Greg Flint of Purdue University, Phil Sterne
  3241.  
  3242.      of Lawrence Livermore National  Laboratory,  and  Warren  J.
  3243.  
  3244.      Wiscombe of NASA Goddard for reporting some bugs in Versions
  3245.  
  3246.      2.1 and 2.2. We also thank John Amor of  the  University  of
  3247.  
  3248.      British  Columbia,  Daniel P. Giesy of NASA Langley Research
  3249.  
  3250.      Center,  Hugh  Nicholas  of  the  Pittsburgh  Supercomputing
  3251.  
  3252.      Center, Dan Severance of Yale University, and Larry Weissman
  3253.  
  3254.      of  the  University  of  Washington  for   suggesting   some
  3255.  
  3256.      improvements.  Nelson  H. F. Beebe of the University of Utah
  3257.  
  3258.      kindly  helped  with  the  documentation,  and  pointed  out
  3259.  
  3260.      several  bugs  in  Version 2.3. Reg Clemens of the Air Force
  3261.  
  3262.      Phillips Lab in Albuquerque and Fritz Keinert of Iowa  State
  3263.  
  3264.      University  helped  debug  Version  2.4.  We also thank Jack
  3265.  
  3266.      Dongarra for putting Ftnchek  into  the  Netlib  library  of
  3267.  
  3268.      publicly available software.
  3269.  
  3270.  
  3271.           For further information, you  may  contact  Dr.  Robert
  3272.  
  3273.      Moniot at either of the following network addresses:
  3274.  
  3275.  
  3276.            MONIOT@FORDMULC.BITNET
  3277.  
  3278.            moniot@mary.fordham.edu
  3279.  
  3280.  
  3281.  
  3282.           This document is named FTNCHEK.DOC. The Ftnchek program
  3283.  
  3284.      can be obtained by sending the message
  3285.  
  3286.  
  3287.          send ftnchek from fortran
  3288.  
  3289.  
  3290.      to the  Internet  address:  netlib@ornl.gov  .  Installation
  3291.  
  3292.      requires a C compiler for your computer.
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.