home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / fchk294s.zip / ftnchek-2.9.4 / dcl2inc.doc < prev    next >
Text File  |  1996-10-01  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4. DCL2INC(1)                                             DCL2INC(1)
  5.  
  6.  
  7. NAME
  8.        dcl2inc  -  postprocess ftnchek .dcl files to create sepa-
  9.        rate INCLUDE files
  10.  
  11. SYNOPSIS
  12.        dcl2inc *.dcl
  13.  
  14. DESCRIPTION
  15.        dcl2inc  postprocessing  declaration   files   output   by
  16.        ftnchek(1),  replacing  unique COMMON block definitions by
  17.        Fortran INCLUDE statements.  For each input .dcl  file,  a
  18.        modified  output  .dcn  file  is  produced,  together with
  19.        include files named by the COMMON block name,  with  file-
  20.        name extension .inc.
  21.  
  22.        In addition, dcl2inc produces on stdout a list of Makefile
  23.        dependencies for the UNIX make(1) utility.  These  can  be
  24.        appended to the project Makefile to ensure that any subse-
  25.        quent changes  to  .inc  files  provoke  recompilation  of
  26.        source files that include them.
  27.  
  28.        dcl2inc  warns about COMMONs which differ from their first
  29.        occurrence, and simply copies  them  to  the  output  .dcn
  30.        file, instead of replacing them with an INCLUDE statement.
  31.        Thus, any COMMON statements that are found in  the  output
  32.        .dcn  files  should be examined carefully to determine why
  33.        they differ: they may well be in error.
  34.  
  35.        Replication of identical data, and bugs arising from  sub-
  36.        sequent  modification of only part of it, is a significant
  37.        reason why Fortran  programming  projects  should  require
  38.        that  COMMON declarations occur in separate include files,
  39.        so that there is only a single point of definition of  any
  40.        global object.
  41.  
  42.        Even  though  the Fortran INCLUDE statement was tragically
  43.        omitted from the 1977 Standard, it has  long  been  imple-
  44.        mented  by  virtually all compiler vendors, and is part of
  45.        the 1990 Standard.  In practice,  there  is  therefore  no
  46.        portability  problem associated with use of INCLUDE state-
  47.        ments, provided that one avoids  nonportable  file  names.
  48.        As long as the code obeys Fortran's limit of six-character
  49.        alphanumeric names, the  filenames  generated  by  dcl2inc
  50.        will  be  acceptable on all current popular operating sys-
  51.        tems.
  52.  
  53.        Fortran's default, or IMPLICIT, variable typing is  depre-
  54.        cated  in modern programming languages, because it encour-
  55.        ages sloppy documentation, and worse,  bugs  due  to  mis-
  56.        spelled  variables,  or variables that have been truncated
  57.        because they extend past column 72.  If all variables used
  58.        are  explicitly  typed,  and  a compiler option is used to
  59.        reject all program units with untyped variables,  variable
  60.        spelling and truncation errors can be eliminated.
  61.  
  62.  
  63.  
  64. Version 1.00              12 March 1995                         1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DCL2INC(1)                                             DCL2INC(1)
  71.  
  72.  
  73.        Variable  declarations  that  have been produced automati-
  74.        cally by a tool like ftnchek(1) or pfort(1) have a consis-
  75.        tent format that facilitates application of stream editors
  76.        (e.g. to change array dimensions or rename variables), and
  77.        simple  floating-point  precision  conversion  tools  like
  78.        d2s(1), dtoq(1), dtos(1), qtod(1), s2d(1), and stod(1).
  79.  
  80. CAVEAT
  81.        The current version (2.9) of ftnchek(1) does  not  produce
  82.        Fortran  EQUIVALENCE statements in .dcl files, so you must
  83.        be careful to preserve them when replacing original decla-
  84.        rations with new ones from .dcl or .dcn files.
  85.  
  86. SEE ALSO
  87.        d2s(1),  dtoq(1),  dtos(1), ftnchek(1), make(1), pfort(1),
  88.        qtod(1), s2d(1), stod(1).
  89.  
  90. AUTHOR
  91.        Nelson H. F. Beebe, Ph.D.
  92.        Center for Scientific Computing
  93.        Department of Mathematics
  94.        University of Utah
  95.        Salt Lake City, UT 84112
  96.        Tel: +1 801 581 5254
  97.        FAX: +1 801 581 4148
  98.        Email: <beebe@math.utah.edu>
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. Version 1.00              12 March 1995                         2
  131.  
  132.  
  133.