It is a bit of a nuisance for every code to ask for the same input repeatedly. One way around this is to use directed input from a file. In this case the input to the code lagint would be stored in the file lagint.in so that the call to lagint would be
Lagint < lagint.in
The nice thing is that subsequent calls are made by the keyboard input
<cr>
with very few typos. While this takes care of constant input, modifying the input requires
E lagint.in
Change the parameter
Exit
<cr>
The edit step is a bit of a nuisance, just to change one parameter. There are system specific routines for reading the command line. This enables the command
Lagint -10 10 100 tlag.out
Subsequent calls are
A few ¬'s to locate the parameters to change
<cr>
I find this enough of an improvement, that it justifies having a separate file with the necessary subroutines to read the command lines. The MS/DVF file is Iprargs.for. The watfor file which requires that the library be set to watfor is WPRARGS.FOR and it is called for testing by the file TWPRARG.FOR. In the event of insufficient arguments, these routines revert to asking questions. The argument order is nreal reals, nint , integers, nchar, characters. The arguments are space delimited.
To set the library in the w87.exe routine that I name E, go to the watfor folder, enter the command
Config E
One of the subcommands is library. Insert
c:\watfor\watfor
Do not add .lib on the last extension. Then save the module and exit.
/* The normal
usage is
argc are
the arguments when the code is called,
argv are
the string variables */
void main(int argc,char *argv[])
{char *namenu;
/* this is where the call is checked for
temp.mnu */
for
(i=0;i<argc;i++)
{printf("
args %s \n",argv[i]);}
if(i
>= 2)
{namenu=argv[1];}
printf("
namenu = %s \n",namenu);