******************************************************************************* * * Menu Picture * * Module %M% Version %I% Date %H% * * (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved * This is unpublished proprietary source code of Ardent Software Inc. * The copyright notice above does not evidence any actual or intended * publication of such source code. * ******************************************************************************* * * Maintenence log - insert most recent change descriptions at top * * Date.... GTAR# WHO Description......................................... * 10/14/98 23801 SAP Change copyrights. * 08/22/89 6225 JWT avoid undefined variable message * 07/25/88 - - Maintenence log purged at 5.2.1, see release 5.1.10. * ******************************************************************************* $OPTIONS DEFAULT dim screen(24) prompt "=" h = "Menu Picture Utility":space(35):"'tl'" heading h 1 print "Name of the Menu file ":; input file if file="" then stop open file to f.file else print "Can't open the '":file:" file." goto 1 end 2 print "Name of the Menu ":; input menu if menu="" then goto 1 read item from f.file,menu else print "Can't read item '":menu:"' from the '":file:"' file." goto 2 end XX=0; YY=0 mat screen = space(80) screen(0) = space(80) kount = 0; X=0; Y=2; temp = item<1> if temp # '' then if(len(temp)>55) then temp = temp[1,55] XX=40-len(temp)/2; screen(0)[XX,len(temp)] = temp YY=0 end n = dcount(item<2>,@VM); for i=1 to n p = item<2,i> c = item<3,i> if c # '' then YY += 1; x = X; y = YY gosub getcur XX = x; YY = y kount += 1 temp = kount:". ":p; screen(YY)[XX,len(temp)] = temp end else YY += 1; x = X; y = YY gosub getcur XX = x; YY = y temp = p; screen(YY)[XX,len(temp)] = temp end if y>Y then Y = y; next i x = X; if Y>20 then y = 22 else y = y+2; p = item<5> gosub getcur X=x; Y=y+1; XX = x; YY = y if p # '' then temp = p; screen(YY)[XX,len(temp)] = temp end else temp = "Which would you like? ( 1 - ":kount:" )"; screen(YY)[XX,len(temp)] = temp end printer on heading "Account = ":@who:" MENU file = ":file:" MENU = ":menu:" as of 'tl'" for i=0 to 23 print trimb(screen(i)) next i printer close; printer off goto 2 getcur: t = p if p[1,2] = '@(' then z = field(p,')',1)[3,9999]; p = field(p,')',2) x = field(z,',',1); y=field(z,',',2) end return