Dec 282017
Robert Moniot's Fortran source code checker.
File FTNCHECK.ZIP from The Programmer’s Corner in
Category Miscellaneous Language Source Code
Robert Moniot’s Fortran source code checker.
File Name File Size Zip Size Zip Type
FTNCHEK.EXE 183096 62434 deflated
LFCRLF11.ZIP 16331 15703 deflated
README 2265 979 deflated
SOURCE 0 0 stored
AVERAGE.F 1201 467 deflated
AVERAGE.OUT 2777 985 deflated
BUILD.COM 1206 592 deflated
FORLEX.C 47238 13962 deflated
FORTRAN.C 100311 19303 deflated
FORTRAN.Y 56481 12015 deflated
FTNCHEK.C 27017 8217 deflated
FTNCHEK.DOC 80472 22471 deflated
FTNCHEK.H 11161 3842 deflated
FTNCHEK.HLP 23153 8063 deflated
FTNCHEK.MAN 65854 20384 deflated
FTNCHEK.PS 164636 52813 deflated
INTRINS.H 3371 928 deflated
IOKEYWDS.H 4673 1873 deflated
MAKEFILE 2667 1197 deflated
MAKEFILE.MPW 2072 936 deflated
MAKEFILE.TC 640 331 deflated
PRSYMTAB.C 49015 11713 deflated
README 6140 2698 deflated
SYMTAB.C 57679 13940 deflated
SYMTAB.H 11091 3965 deflated
SYMTAB2.C 36596 9265 deflated
TOKDEFS.H 1972 595 deflated

Download File FTNCHECK.ZIP Here

Contents of the README file

[Modified on 2/3/93 by J Landman [email protected],
to reflect the changes neccessary for PC use]

This directory contains files for anonymous ftp access.
The files in this directory are for Ftnchek Version 2.6.
The shar and tar files contain source and documentation.
The zip file contains only the executable program.

Bytes Date Name Description
====== ================= =============== =========================
1012 Feb 03 1993 09:29 README This file.

306178 Feb 01 1993 21:34 ftnchek.shar.Z Compressed Unix shar file.
Unpack with command:
zcat ftnchek.shar.Z | sh

304411 Feb 01 1993 21:35 ftnchek.tar.Z Compressed Unix tar file.
Unpack with command:
zcat ftnchek.tar.Z | tar -xf -

71205 Feb 03 1993 09:26 Zipped IBM PC executable.
Unpack with command:

Info for PC Users:

Use some variant of pkzip 1.10 or compatible to unzip it.
For those interested, there is a directory called source created
when unzipping. This contains all the source code as distributed
in the tarred compressed file. Therefore, it probably has simple
LF's at the end of each line, and no cr-lf pairs. Use one of the
standard dos->unix unix->dos converters (such as at simtel)
to convert the source files as needed.

I will be attempting to build an os/2 (1.3 and 2.0) version of this program
and will upload it as soon as it is finished. (no plans for an MS
windows compilation unless demand warrants it (who actually uses the
braindead windows environment for programming/debugging anyway?))

Included in this distribution is the executable as compiled by the
author (Bob Moniot at Fordham). Use at your own risk. I have not
tested this code yet, though previous versions of ftnchek have been very
useful debugging tools. Caveat Receptor (let the user beware).

Joe Landman [email protected]
[email protected]
[email protected]

README file for Ftnchek Version 2.6.1

Author: Robert Moniot
Fordham University
New York, NY 10023 USA
Telephone: (212) 636-6331
Internet: [email protected]

Date:January 1993

Ftnchek is written in a portable style of C. You must have a C
compiler for the machine on which you wish to run the program.

If the file you received is in the form of a "sh archive" or "shar"
file, and you received it by electronic mail, you should first
concatenate all parts in order (if it was sent in pieces), removing
any mail headers. If you received it by ftp, this step should not be
necessary. Next, if you have a UNIX system, simply feed it as input
to the program "sh" to unpack it automatically. If you do not have a
UNIX system, you will have to use your text editor to clip out each
file manually. You will observe that each line of every file has been
prefixed with the letter X, and all tabs have been converted to the
grave accent (ASCII code 60 hexadecimal). This was done to prevent
clobbering during shipment across network gateways. You should use
your editor to remove all initial X's and to change all grave accents
to tabs.

If the file you received is a Unix compressed tar file, you should
first unzip it using the Unix "uncompress" command, and then give it
as input to "tar" to unpack the files. For example, assuming the file
has been placed in the desired directory, and is named ftnchek.tar.Z, you
would give the two Unix commands
uncompress ftnchek.tar.Z
tar -xf ftnchek.tar

After accomplishing this step, you should find that you have received
the following set of source files:

ftnchek.c intrins.h symtab.h
ftnchek.h iokeywds.h symtab2.c
forlex.c prsymtab.c tokdefs.h
fortran.c symtab.c

You should also have received the following auxiliary files:

average.f makefile makefile.mpw
average.out fortran.y

Documentation is in the files:

ftnchek.doc ftnchek.hlp

The first is a flat text file. Ftnchek.hlp is for making a help
library for VMS systems. and are provided for
the convenience of those with access to nroff/troff or PostScript,

VAX/VMS users should rename "AVERAGE.F" to "AVERAGE.FOR".
Once Ftnchek is working, you can test it by giving the command:

$ ftnchek -list -sym average

Then compare the output against the file "average.out". (Tabs and
trailing blanks have been removed from average.out due to shipping the
Ftnchek package across network gateways.)

To install Ftnchek, follow the instructions below for your operating

(1) Unix

Give the command:

$ make

Note: System-specific compilation options are provided for some
systems. Users installing Ftnchek on one of these systems should
say "make system_name" where system_name is one of the following


Also, see the makefile for options that allow compiling with bigger
table sizes or accepting/rejecting certain syntax extensions.


Give the command


After the program has been compiled, you must turn it into a
so-called "DCL foreign command" so that it can be invoked by
giving its name on a command line, instead of using the RUN
command. Do this with the command

$ FTNCHEK :== $disk:[directory]FTNCHEK

where you substitute the disk and directory names where the file
FTNCHEK.EXE resides. This command must be executed once per
login. It is suggested you put this command into your LOGIN.COM

The BUILD procedure also creates a VMS help library named
FTNCHEK.HLB. To access it from the VMS HELP command, you must
give the command


Again, this command must be executed once per login to have effect.

(3) MS-DOS with Turbo C

Rename the file "" to "makefile" and then give the


(4) Macintosh Programmer's Workshop (MPW)

Rename the file "makefile.mpw" to "makefile". Edit the file,
changing character '+' to CHAR(182), option-d on the Macintosh
keyboard; and the character '/' to CHAR(196), option-f. Then
use the "make" command to create Ftnchek.

(5) Other systems

It should suffice simply to compile all the ".c" files and link
them. The only differences among the versions for different
operating systems have to do with the use of "/" vs. "-" as an
option prefix, and the default filename extension ".FOR" vs. ".f".
Selection among these options is done by defining a macro name for
each system. The VAX/VMS compiler pre-defines the macro name
"VMS", while the Turbo C compiler pre-defines "__TURBOC__".
Compilation without defining either of these macro names is the
same as compiling with "UNIX" defined.

To allow "/" as an option prefix, you can define the macro name
"VMS", either as a commandline option to the compiler, or by
altering the file ftnchek.h: just remove the commenting-out of
the appropriate #define command found there. In any case, "-" is
always allowed as an option prefix.

The default extension ".FOR" is assumed for VMS or Turbo C, ".f"
for all others, unless you define the macro name
"DEF_SRC_EXTENSION" otherwise on the compiler commandline or in
ftnchek.h. Other default values of Ftnchek's built-in parameters
can be similarly modified on the compiler commandline. See
ftnchek.h for details.

If your Fortran compiler supports many of the common I/O extensions
found in VAX Fortran, you can compile the source using the compiler
flag -DVMS_IO to cause Ftnchek to accept these extensions without
assuming all other the VAX Fortran extensions and conventions. The
VAX I/O extensions include, for instance several additional control
keywords for the OPEN statement, such as CARRIAGECONTROL, READONLY,

 December 28, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>