Re: Fortran77 & GUI

From: Kevin G. Rhoads (kgrhoads_at_alum.mit.edu)
Date: 05/12/04


Date: Wed, 12 May 2004 15:04:06 +0000


>The reason being the interactive command line based input is time
>consuming and warrants errorfree input (and hard to change them)

I have run into this issue numerous times. My preferred solution,
which may not be the best for you, is to make interactive command
line input the fall-back which the program attempts if a file of
input data is not specified. By moving input off to a file, there
are several advantages:
1) by use of various OPENs in conditionals, the input unit can be
bound to either the console window or to the file -- no changes
are needed to existing READ statements, provided they already specify
a unit and only trivial changes are needed to add this if they don't,
meanwhile -- the file contains the responses the user would have supplied
interactively
2) this is easy to test using command-line redirection with NO
code changes on many platforms
3) input errors are reduced since the file can be editted in advance
and new, modified runs can be made by copying an input file and
modifying it
4) with a trivial extension, the program can be made to take multiple
command files and do each run in order
5) the existing interactive input is preserved as an option, which may
be an advantage in some situations

Putting a GUI front-end on what is essentially a batch number crunch
program is, to my taste, not a good approach.

YMMV
Kevin