Instructions for Installing Floppy v7.0
---------------------------------------

o  Floppy is a Fortran Coding Convention Checker and Fortran
   code tidier. Floppy understands standard Fortran 77 code.

o  This version of Floppy also understands lower-case source
   form, and variables with length up to 31 characters.

o  Extensions INCLUDE, DO, DO WHILE, END DO are also supported

o  The user may specify any combination of a total of 46
   different coding conventions. These are described fully 
   in the Floppy guide, which comes as a PostScript file in
   the posting. (I also include the list of checks at the
   end of this article, those marked with an asterisk 
   correspond to those CERN considers to be a "standard" set.)

o  Users may tidy their code by renumbering all
   statement labels, renumbering all FORMAT statements, 
   indenting DO and IF clauses, right-adjusting GOTOs and
   by moving all FORMAT statements to the end of each program
   module. Any combination of these tidy options is possible.

o  Users may generate HTML from Fortran. This is described
   in the Help files and User Guide.

Floppy was initially written for VMS systems. The posting
includes routines and execs that allow Floppy to be built
for VM/CMS, OpenVMS and Unix systems. The procedure for
each system is described briefly below. 

Floppy was written by Julian Bunn and Hans Grote, at CERN, the
European Centre for Particle Physics in Geneva, Switzerland.

First Steps
-----------

There is a document in PostScript form, called "floppy.ps", 
which describes in detail how Floppy works and is used on
Unix, OpenVMS and VM/CMS systems.

Please read the file called "copyright". 

(Please also note that the source code for Floppy does
 NOT necessarily conform to the coding conventions it
 itself checks ! You may draw whatever conclusions you
 wish from this fact !)

Installing on Unix Systems
--------------------------
1)  After unpacking the source files, you should type "make".
2)  If your Fortran compiler is not called "f77" then you
    should first edit the file called "makefile" accordingly. 
3)  If your f77 compiler will only accept files with extension
    .f, then modify the makefile according to the instructions
    therein.
4)  If you are building Floppy on the HP-UX operating system,
    then remove the reference to "ior.o" in the makefile, and
    add the following compiler directive after the declarations
    in "unixfloppy.for":

    $HP9000_800 INTRINSICS ON

    and add the following before the "end" statement in the same
    file:

    $HP9000_800 INTRINSICS OFF

As installation has not been checked on all of Unix platforms, 
you may also have to fiddle a bit with the makefile, and possibly 
with the syntax of the "include" directives in the .for files.

The "man" page for Floppy is called "floppy.l". 

Installing on VMS Systems
-------------------------
0)  Unpack the source by whatever method you have.
1)  Copy all the files to a dedicated directory on your VMS system. 
2)  Type @MAKE_VMS.
3)  Take the "floppy.cld" file, and edit it so that the 
    image name is correct for your .EXE. 
4)  Then type "$ set command floppy". 
5)  Run a simple test on one of your Fortran files, for example:
    $ floppy myfile.for /log /checks /tidy/indent=1
    This test should produce some convention check messages and
    then produce a new Fortran file containing IF,DO clauses re-
    indented by one space.
9)  Refer to the VMS help file in "floppy.hlp" for the 
    syntax of the command. 

To make Floppy available for all users on your VMS system, you
will need privilege to update DCLTABLES with the "set command" command.
Briefly, the procedure is like this:
    $ set comm/table=sys$common:[syslib]dcltables -
      /out=sys$common:[syslib]dcltables floppy
    $ install replace sys$library:dcltables

Installing on VM/CMS
--------------------
1)  Copy all the files to a temporary CMS minidisk. 
2)  Invoke the exec MKFLOPPY with argument the letter of the
    temporary mini-disk. E.g. MKFLOPPY T

Note that, for full-screen interaction, you need
the IOS3270 Program Offering from IBM. But Floppy also
works in command line mode. Refer to the HELPCMS file
for details. The CMS helpfile for Floppy is called FLOPPY.HELPCMS
in the posting. The IOS3270 panel is called FLOPPY.PANEL.

Disclaimer
----------
If you manage to port Floppy to another platform, I would be
very interested to hear details. Unfortunately, I cannot assist
in any way with such exercises. Please read the file called
"copyright" in the posting.

-------------------------------------------------------------------

Julian Bunn
Computing and Networks Division
CERN
Geneva
Switzerland
Email: julian@vxcern.cern.ch
16th. April 1993

List of Coding Conventions in Floppy


  *  Check no. 1   Avoid comment lines after end of module
  *  Check no. 2   End all program modules with the END statement
  *  Check no. 3   Declared COMMON blocks must be used in the module
  *  Check no. 4   COMPLEX and DOUBLEPRECISION vars at end of COMMON
  *  Check no. 5   COMMON block definitions should not change
  *  Check no. 6   Variable names should be 6 or less characters long
     Check no. 7   Variables in COMMON should be 6 characters long
     Check no. 8   Variables not in COMMON should be <6 characters
  *  Check no. 9   Integer variables should begin with I to N
  *  Check no. 10  Variable names should not equal FORTRAN keywords
  *  Check no. 11  Avoid comment lines before module declaration
  *  Check no. 12  Module names should not equal intrinsic functions
  *  Check no. 13  Modules should declare IMPLICIT NONE
  *  Check no. 14  Module should begin with at least 3 comment lines
     Check no. 15  Comment lines should begin with a C or * or !
  *  Check no. 16  No comment lines between continuations
  *  Check no. 17  Avoid non-standard variable types eg INTEGER*2
  *  Check no. 18  Avoid multiple COMMON definitions per line
  *  Check no. 19  Do not dimension COMMON variables outside COMMON
  *  Check no. 20  Avoid embedded blanks in variable names
  *  Check no. 21  Avoid embedded blanks in syntactic entities
  *  Check no. 22  Avoid the use of PRINT statements (use WRITE)
     Check no. 23  Do not give the END statement a label
  *  Check no. 24  Avoid WRITE(* construction
     Check no. 25  Avoid WRITE statement in a FUNCTION
  *  Check no. 26  Avoid the use of PAUSE statements
  *  Check no. 27  Statement labels should not begin in column 1
  *  Check no. 28  Always precede STOP by a descriptive WRITE
  *  Check no. 29  Avoid the use of ENTRY in FUNCTIONS
  *  Check no. 30  Avoid using I/O in FUNCTIONs
     Check no. 31  Avoid the use of the alternate RETURN statement
  *  Check no. 32  COMMON block names should not equal variable names
  *  Check no. 33  Avoid use of obsolete CERN library routines
     Check no. 34  Avoid FUNCTION names the same as intrinsics
  *  Check no. 35  Local functions should be declared EXTERNAL
  *  Check no. 36  Module names should all be different
  *  Check no. 37  Avoid expressions of mixed mode eg A=B/I
  *  Check no. 38  Length of passed CHARACTER variables should be   *
  *  Check no. 39  Order of statements should conform to note
  *  Check no. 40  Separate Statement Functions by comment lines
  *  Check no. 41  No names in Statement Function definitions elsewhere
     Check no. 42  Use LLT,LGT etc to compare CHARACTER vars. in IFs
     Check no. 43  Variables (not COMMON, not PARAMs) <6 characters
  *  Check no. 44  Passed arguments should be dimensioned * in module
     Check no. 45  Variables in COMMON should be >= 6 characters long
     Check no. 46  Avoid the use of the ENTRY statement
