h05107
s 00004/00004/00040
d D 1.2 83/01/28 14:05:56 tes 2 1
c initial_internal_update
e
s 00044/00000/00000
d D 1.1 83/01/28 13:05:38 tes 1 0
c date and time created 83/01/28 13:05:38 by tes
e
u
tes
mjb
mrk
mmm
U
t
T
I 1
subroutine minmax (count, datary, dmin, dmax)
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: determine data extremes                                #
#                                                                      #
#     Input Parameters:                                                #
#            count - number of data points in input array              #
#            datary - real array containing data                       #
#                                                                      #
#     Output Parameters:                                               #
#            dmin - minimum data value encountered                     #
#            dmax - maximum data value encountered                     #
#                                                                      #
#     Routines Called:                                                 #
#            none                                                      #
#                                                                      #
########################################################################
integer count
real datary(1), dmin, dmax
real dbig, dlit, datapt
integer i
D 2
PLOTxREALS PLOTxGETREAL
E 2
I 2
real gtreal 
E 2
 
   dlit = 10.**25
   dbig = -dlit
   if (count > 0) {
      do i=1, count {
D 2
	 datapt = PLOTxGETREAL(datary(i))
E 2
I 2
	 datapt = gtreal (datary, i-1)
E 2
         dlit = amin1 (dlit, datapt)
         dbig = amax1 (dbig, datapt)
         }
      }
D 2
   PLOTxPUTREAL(dlit,dmin)
   PLOTxPUTREAL(dbig,dmax)
E 2
I 2
   call ptreal (dlit, 0, dmin)
   call ptreal (dbig, 0, dmax)
E 2
   return
end
E 1
