Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- maxmin

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
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, i
          write (*, dfmt) cname (index), iminline (index), rmin (index),
     *                    imaxline (index), rmax (index)
Opens
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

Coastal and Marine Science Centers:  Pacific   St. Petersburg   Woods Hole  
InfoBank   Coastal and Marine Geology Program   Geologic Information   Ask-A-Geologist   USGS Disclaimer  


Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://walrus.wr.usgs.gov/infobank/programs/util/maxmin/maxmin.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:37:05 PDT 2013  (chd)