h07551
s 00016/00021/00042
d D 1.3 83/03/08 23:10:14 mrk 3 2
c changes to quarterly periodic axis type
e
s 00000/00000/00063
d D 1.2 83/01/28 13:56:11 tes 2 1
c initial_internal_update
e
s 00063/00000/00000
d D 1.1 83/01/28 13:03:18 tes 1 0
c date and time created 83/01/28 13:03:18 by tes
e
u
tes
mjb
mrk
mmm
U
t
T
I 1
subroutine gpnval (value, length, txtstr)
########################################################################
#                                                                      #
#          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: generate the next label in a sequence                  #
#                                                                      #
#     Input Parameters:                                                #
#            value - next label index                                  #
#                                                                      #
#     Output Parameters:                                               #
#             length - number of ade characters in output string       #
#             txtstr - array of ade characters representing next label #
#                                                                      #
#     Routines Called:                                                 #
D 3
#            gimnmx - bound an integer variable                        #
E 3
#                                                                      #
########################################################################
integer length, txtstr(1)
real value
 
D 3
integer labels(58), gimnmx, i, k, jvalue
E 3
I 3
integer i, k
SHORTINT labels(69), offset(5)
E 3
 
include(`pltcom')
 
I 3
data offset /1, 1, 22, 22, 58/

E 3
data labels /BIGM, LETO, LETN, BIGT, LETU, LETE, BIGW, LETE, LETD,
D 3
             BIGT, LETH, LETU, LETR, BIGF, LETR, LETI, BIGS, LETA, LETT,
E 3
I 3
             BIGT, LETH, LETU, BIGF, LETR, LETI, BIGS, LETA, LETT,
E 3
             BIGS, LETU, LETN,
I 3

E 3
             BIGJ, LETA, LETN, BIGF, LETE, LETB, BIGM, LETA, LETR,
             BIGA, LETP, LETR, BIGM, LETA, LETY, BIGJ, LETU, LETN,
             BIGJ, LETU, LETL, BIGA, LETU, LETG, BIGS, LETE, LETP,
D 3
             BIGO, LETC, LETT, BIGN, LETO, LETV, BIGD, LETE, LETC/
E 3
I 3
             BIGO, LETC, LETT, BIGN, LETO, LETV, BIGD, LETE, LETC,

	     DIG1, LETS, LETT, DIG2, LETN, LETD, DIG3, LETR, LETD,
	     DIG4, LETT, LETH/
E 3
 
D 3
   length = 0
   jvalue = value
   if (nperid < 3) {
      length = 3
      i = gimnmx (jvalue, 1, 7)
      if (i == 4) length = 4
      k = (i-1)*3 + 1
      if (i > 4) k = k+1
      }
   else if (nperid < 5) {
      length = 3
      k = gimnmx (jvalue, 1, 12)
      k = (k-1)*3 + 23
      }
E 3
I 3

   k = 3*(ifix(value) - 1) + offset(nperid)

   length = 3    # All strings are three long
   if (nperid == 2 | nperid == 4) length = 1  # For single letter day and month
E 3
 
D 3
   if (nperid == 2 | nperid == 4) length = 1
 
   for (i=1; i<=length; i=i+1) {
E 3
I 3
   do i=1, 3  {   # input array is at least 3 long
E 3
      txtstr(i) = labels(k)
      k = k+1
      }
 
   return
end
E 1
