home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a040 / 2.ddi / SHRWARE4.ARC / MSAEDONE.INC < prev    next >
Encoding:
Text File  |  1988-06-06  |  8.2 KB  |  267 lines

  1. <<* MSAEDONE.INC *>>
  2. <<#
  3.  
  4. procedure EditOne  <<*Single Page: (Simple,Bracketed)*>>
  5. string line1,line2
  6. begin
  7.   line1 := '@ row,0 SAY "EDIT/VIEW:  {E}dit  {F}ind  {G}oto  {L}ocate  <Del> "'
  8.   line2 := '@ row+1,12 SAY "{N}ext-record  {P}rev-record  <Return>"'
  9.          <<*12345678901234567890123456789012345678901234567890*>>
  10.   if ismultials
  11.     line2 := stuff( line2,47,0,'{S}elect  ' )
  12.   endif
  13.   if feat(featlabel)
  14.     line2 := stuff( line2,47,0,'{O}utput  ' )
  15.   endif
  16.   if Simple
  17.     line1 := ChangePat( line1,'{','(' )
  18.     line2 := ChangePat( line2,'{','(' )
  19.     line1 := ChangePat( line1,'}',')' )
  20.     line2 := ChangePat( line2,'}',')' )
  21.   endif
  22.   genln( line2 )   <<*Gen them in reverse order*>>
  23.   genln( line1 )
  24.          <<*1234567890123456789012345678901234567890*>>
  25.   line1 := 'DO GetKey WITH editchoice,"EFGLNP"+DelRecord+Returnkey'
  26.   if ismultials
  27.     line1 := stuff( line1,34,0,'S' )
  28.   endif
  29.   if feat(featlabel)
  30.     line1 := stuff( line1,33,0,'O' )
  31.   endif
  32.   genln( line1 )
  33. end EditOne
  34.  
  35.  
  36. procedure EditPage
  37. string line1,line2
  38. begin
  39. <<*         123456789012345678901234567890123456789012345678901234567890*>>
  40.   line1 := '@ row,0 SAY "EDIT/VIEW:  {E}dit  {F}ind  {G}oto  {L}ocate  <PgDn>  <PgUp> "'
  41.   line2 := '@ row+1,12 SAY "{N}ext-record  {P}revious-record  <Del>  <Return>"'
  42.   if ismultials
  43.     line1 := stuff( line1,60,0,'<Del>  ' )     <<*insert*>>
  44.     line2 := stuff( line2,51,5,'{S}elect' )    <<*delete/insert*>>
  45.   endif
  46.   if feat(featlabel)
  47.     line2 := stuff( line2,51,0,'{O}utput  ' )
  48.   endif
  49.   if ismultials or feat(featlabel)
  50.     line2 := stuff( line2,38,4,'' )            <<*delete*>>
  51.   endif
  52.   if Simple
  53.     line1 := ChangePat( line1,'{','(' )
  54.     line2 := ChangePat( line2,'{','(' )
  55.     line1 := ChangePat( line1,'}',')' )
  56.     line2 := ChangePat( line2,'}',')' )
  57.   endif
  58.   genln( line2 )   <<*Gen them in reverse order*>>
  59.   genln( line1 )
  60.          <<*1234567890123456789012345678901234567890*>>
  61.   line1 := 'DO GetKey WITH editchoice,"EFGLNP"+DelRecord+PgDn+PgUp+Returnkey'
  62.   if ismultials
  63.     line1 := stuff( line1,34,0,'S' )
  64.   endif
  65.   if feat(featlabel)
  66.     line1 := stuff( line1,33,0,'O' )
  67.   endif
  68.   genln( line1 )
  69. end EditPage
  70.  
  71.  
  72. procedure EditOldOne  
  73. string line1,line2
  74. begin
  75.   line1 := '@ row,0 SAY "EDIT/VIEW:  {D}el  {E}dit  {F}ind  {G}oto  {L}ocate '
  76.   line2 := '@ row+1,12 SAY "{N}ext-record  {P}revious-record  '
  77.   if ismultials
  78.     line1 := line1 + ' <Return> "'
  79.     line2 := line2 + '{S}elect"'
  80.   else
  81.     line1 := line1 + '"'
  82.     line2 := line2 + '<Return>"'
  83.   endif
  84.   if Simple
  85.     line1 := ChangePat( line1,'{','(' )
  86.     line2 := ChangePat( line2,'{','(' )
  87.     line1 := ChangePat( line1,'}',')' )
  88.     line2 := ChangePat( line2,'}',')' )
  89.   endif
  90.   genln( line2 )   <<*GEN in reverse order*>>
  91.   genln( line1 )
  92.          <<*1234567890123456789012345678901234567890*>>
  93.   line1 := 'DO GetKey WITH editchoice,"EFGLNP"+DelRecord+Returnkey'
  94.   if ismultials
  95.     line1 := stuff( line1,34,0,'S' )
  96.   endif
  97.   genln( line1 )
  98. end EditOldOne
  99.  
  100.  
  101. procedure EditOldPage  
  102. string line1,line2
  103. begin
  104.   line1 := '@ row,0 SAY "EDIT/VIEW:  {D}el  {E}dit  {F}ind  {G}oto  {L}ocate  {T}urn-page "'
  105.   line2 := '@ row+1,12 SAY "{N}ext-record  {P}revious-record  <Return>"'
  106.          <<*123456789012345678901234567890123456789012345678901234567890*>>
  107.   if ismultials
  108.     line2 := stuff( line2,51,0,'{S}elect  ' )
  109.     line2 := stuff( line2,38,4,'' )
  110.   endif
  111.   if Simple
  112.     line1 := ChangePat( line1,'{','(' )
  113.     line2 := ChangePat( line2,'{','(' )
  114.     line1 := ChangePat( line1,'}',')' )
  115.     line2 := ChangePat( line2,'}',')' )
  116.   endif
  117.   genln( line2 )
  118.   genln( line1 )
  119.          <<*1234567890123456789012345678901234567890*>>
  120.   line1 := 'DO GetKey WITH editchoice,"EFGLNP"+DelRecord+PgDn+Returnkey'
  121.   if ismultials
  122.     line1 := stuff( line1,34,0,'S' )
  123.   endif
  124.   genln( line1 )
  125. end EditOldPage
  126.  
  127.  
  128. procedure prompts( row,col : integer; p1,p2,p3,p4,p5,p6,p7 : string )
  129.  
  130. procedure atprompt( token : string )
  131. begin
  132.   col := col + val( token[1] )   <<* 1st char is GAP value between items *>>
  133.   if token
  134.     if row = 0
  135.       gen( '@ row,' )
  136.     else
  137.       gen( '@ row+1,' )
  138.     endif
  139.     genln( col,' PROMPT "',substr( token,2,255 ),'"' )
  140.   endif
  141.   col := col + len( token ) - 1
  142. end atprompt
  143.  
  144. begin <<*prompts*>>
  145.   atprompt( p1 )
  146.   atprompt( p2 )
  147.   atprompt( p3 )
  148.   atprompt( p4 )
  149.   atprompt( p5 )
  150.   atprompt( p6 )
  151.   atprompt( p7 )
  152. end prompts
  153.  
  154.  
  155. procedure EditLiteOne
  156. <<*       1         2         3         4         5         6
  157. 0123456789012345678901234567890123456789012345678901234567890
  158. EDIT/VIEW:  Edit   Find   Goto   Locate   <Delete> "
  159.             Next-record   Prev-record   <Return>"
  160.             Next-record   Prev-record   Select   <Return>"
  161.             Next-record   Prev-record   Output   <Return>"
  162.  
  163. EDIT/VIEW:  Edit   Find   Goto   Locate   <Del>   Output "
  164.             Next-record   Prev-record   Select   <Return>"
  165. *>>
  166. string keys
  167. begin
  168.   if feat(featlabel) and ismultials
  169.     genln( '@ row,0 SAY "EDIT/VIEW:  Edit   Find   Goto   Locate   <Del>   Output"' )
  170.     genln( '@ row+1,12 SAY "Next-record   Prev-record   Select   <Return>"' )
  171.     prompts( 0,12,'0Edit','3Find','3Goto','3Locate','4Del','4Output','' )
  172.     prompts( 1,12,'0Next-record','3Prev-record','3Select','4Return','','','' )
  173.     keys := '"EFGL"+DelRecord+"ONPS"+Returnkey'
  174.   else
  175.     if feat(featlabel)
  176.     genln( '@ row,0 SAY "EDIT/VIEW:  Edit   Find   Goto   Locate   <Delete>"' )
  177.     prompts( 0,12,'0Edit','3Find','3Goto','3Locate','4Delete','','' )
  178.       genln( '@ row+1,12 SAY "Next-record   Prev-record   Output   <Return>"' )
  179.       prompts( 1,12,'0Next-record','3Prev-record','3Output','4Return','','','' )
  180.       keys := '"EFGL"+DelRecord+"NPO"+Returnkey'
  181.     elsif ismultials
  182. #>>
  183.       menuchoice = 0
  184.       MSG1 = "Edit"
  185.       MSG2 = "Find"
  186.       MSG3 = "Goto"
  187.       MSG4 = "Locate"
  188.       MSG5 = "Delete"
  189.       MSG6 = "Next-record"
  190.       MSG7 = "Prev-record"
  191.       MSG8 = "Select"
  192.       MSG9 = "Return"
  193.       DO {FILEPREFIX}_MENU WITH 1,41,9,12 
  194. <<      keys := '"EFGL"+DelRecord+"NPS"+Returnkey'>>
  195.    << else >>
  196.       menuchoice = 0
  197.       MSG1 = "Edit"
  198.       MSG2 = "Find"
  199.       MSG3 = "Goto"
  200.       MSG4 = "Locate"
  201.       MSG5 = "Delete"
  202.       MSG6 = "Next-record"
  203.       MSG7 = "Prev-record"
  204.       MSG8 = "Return"
  205.       DO {FILEPREFIX}_MENU WITH 1,41,8,12
  206. <<#
  207.       keys := '"EFGL"+DelRecord+"NP"+Returnkey'
  208.     endif
  209.   endif
  210. #>>
  211. editchoice=SUBSTR(Returnkey+{keys},menuchoice+1,1)
  212. <<end EditLiteOne>>
  213.  
  214.  
  215. <<#
  216. procedure EditLitePage
  217. <<*       1         2         3         4         5
  218. 01234567890123456789012345678901234567890123456789012345
  219. EDIT/VIEW:  Edit   Find   Goto   Locate   <Delete>   Turn-page
  220.             Next-record   Previous-record   <Return>
  221.  
  222.             Next-record   Prev-record   Select   <Return>
  223.             Next-record   Prev-record   Output   <Return>
  224.             Next-record   Prev-record   Output   Select   <Return>
  225. *>>
  226. string keys
  227. begin
  228. #>>
  229.       menuchoice = 0
  230.       MSG1 = "Edit"
  231.       MSG2 = "Find"
  232.       MSG3 = "Goto"
  233.       MSG4 = "Locate"
  234.       MSG5 = "Delete"
  235.       MSG6 = "Turn-page"
  236. <<#
  237.   if feat(featlabel) and ismultials
  238.     genln( '@ row+1,12 SAY "Next-record   Prev-record   Output   Select   <Return>"' )
  239.     prompts( 1,12,'0Next-record','3Prev-record','3Output','3Select','4Return','','' )
  240.  
  241.     keys := '"EFGL"+DelRecord+PgDn+"NPOS"+Returnkey'
  242.   elsif feat(featlabel)
  243.     genln( '@ row+1,12 SAY "Next-record   Prev-record   Output   <Return>"' )
  244.     prompts( 1,12,'0Next-record','3Prev-record','3Output','4Return','','','' )
  245.  
  246.     keys := '"EFGL"+DelRecord+PgDn+"NPO"+Returnkey'
  247.   elsif ismultials
  248.     genln( '@ row+1,12 SAY "Next-record   Prev-record   Select   <Return>"' )
  249.     prompts( 1,12,'0Next-record','3Prev-record','3Select','4Return','','','' )
  250.  
  251.     keys := '"EFGL"+DelRecord+PgDn+"NPS"+Returnkey'>>
  252.   else
  253. #>>
  254.      <<* FOR MULTI PAGE RECORDS *>>
  255.       MSG7 = "Next-record"
  256.       MSG8 = "Prev-record"
  257.       MSG9 = "Return"
  258.       DO {FILEPREFIX}_MENU WITH 1,41,9,12
  259.      << keys := '"EFGL"+DelRecord+PgDn+"NP"+Returnkey'>>
  260. <<  endif>>
  261.  
  262. <<* NOT NEEDED -- MENU TO menuchoice *>>
  263. editchoice=SUBSTR(Returnkey+{keys},menuchoice+1,1)
  264. <<end EditLitePage>>
  265.  
  266. <<* EOF: MSAEDONE.INC *>>
  267.