Expanded description
| Topic |
Description |
| Name |
maxmin |
| Synopsis |
/infobank/programs/util/maxmin/maxmin.for |
| Description |
Program to determine the maximum and minimum values of the fields in
a data set.
|
| Process |
Up to 100 fields per record can be handled.
When the values have been found they are printed out to the terminal
in table form.
|
| Prompts |
Enter input file name:
How many fields?
Name of each field?
Enter input format:
|
| Output |
Output is in table form.
Includes:
Name of data set,
Last line on which the maximum value was found,
Maximum value,
Last line on which the minimum value was found,
Minimum value.
Output goes to terminal.
|
| Subroutines |
openem (external shareable)
showlines (external shareable)
forerror (external shareable)
percentage (external shareable)
|
| Limitations |
Variables are assumed to be real numbers, so input formats supplied
by the user must use an 'fn.d' format code.
'n' is the total field width, including decimal point and decimal
places
'd' is the number of decimal places
ex: (t34, f6.0, 2x, f12.4)
Any integer formats in the input format will generate I/O errors.
|
| Author |
Ed Maple 9/24/84 .for
based on previous version written by
nav/geopot group, PAB/Marine, USGS, Menlo Park
Changed line number format in output table to i6 from i5.
Ed Maple 10/11/84
Eliminated code for checking correctness of user-input variable
names.
Ed Maple 2/5/85
Eliminated call to WHATFMT to avoid confusion with input formats
containing integer time. Also upgraded the way output is displayed.
Ed Maple 3/22/88
|
| Reads |
read (*, '(a20)' ) cname (index)
read (*, '(a)') cfmt
read (90, cfmt, iostat = ierr, end = 900)
* (rvalue (index), index = 1, iarray)
|
| Writes |
write (*, '('' #'', i2, '': '', $)' ) index
write (*, '(1x, <iarray>a20)' ) (cname (index), index = 1, iarray)
write (*, dfmt) cname (index), iminline (index), rmin (index),
* imaxline (index), rmax (index)
|
| Calls |
call openem (1,0)
call showlines (90, 3)
call showlines (90, 3)
call changecase ('CAPITAL', cname (index) )
call showlines (90, 3)
call changecase ('CAPITAL', cfmt)
call percentage (90)
call forerror (ierr)
call percentage (0)
|
|