USGS InfoBank banner.  USGS, Coastal and Marine Geology, InfoBank banner.
 USGS Coastal and Marine Geology banner.    Search InfoBank.
USGS InfoBank program -- maxmin Skip navigational links
    ________   ________   ______________   ________   _________   _______________   ________  
  tab edge  Home  tab edge  Data  tab edge  Activities  tab edge  FACS  tab edge  Atlas  tab edge  Definitions  tab edge  More  tab edge  
   
InfoBank Programs: by Name   by Data Type   General Tools   GIS   Plotting   Web   USGS Disclaimer   InfoBank Programs
   
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)
    

Skip footer navigational links

InfoBank   Menlo Park Center   Santa Cruz Center   St. Petersburg Center   Woods Hole Center   Coastal and Marine Geology Program  
 
U. S. Department of the Interior   U. S. Geological Survey   Geologic Information   Ask-A-Geologist   USGS privacy statement   Disclaimer  

URL: /infobank/programs/util/maxmin/maxmin.doc.html
Maintainer: Clint Steele
Last modified: Fri Oct 11 03:11:35 PDT 2002  (wcs)