h00254
s 00054/00000/00000
d D 1.1 83/01/20 11:14:46 tes 1 0
c date and time created 83/01/20 11:14:46 by tes
e
u
tes
mjb
U
t
T
I 1
subroutine qputd (item, string)
########################################################################
#                                                                      #
#          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: Put decimal data to memory associated with a data item #
#                                                                      #
#     Input Parameters:                                                #
#            item - (integer) data item to put to memory               #
#            string - (byte array) encoded real data                   #
#                                                                      #
#     Output Parameters:                                               #
#            none                                                      #
#                                                                      #
#     Routines Called:                                                 #
#            upck4b - routine to unpack real data                      #
#            qptdta - put data to memory                               #
#                                                                      #
########################################################################
SHORTINT string(1)
integer item

SHORTINT buffer(CHARxREALxLENGTH), i, j, k, c1, c2

include(`mnucom')

k = CHARxREALxLENGTH - 1
do i=1, k { buffer(i) = BLANK }
j = 0
do i = 1, DATAxREALxLENGTH {
   call upck4b (string(i), c1, c2)
   # decode data assuming decimal characters
   if (c1 != NUL) c1 = c1 + STAR
   if (c2 != NUL) c2 = c2 + STAR
   j = j + 1
   buffer(j) = c1
   j = j + 1
   buffer(j) = c2

   # assumption - if c1 is NUL then c2 is NUL
   if (c2 == NUL) break
   }

buffer(CHARxREALxLENGTH) = NUL
call qptdta (item, buffer)

return
end
E 1
