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

  1. <<* APPPRIV.INC *>>
  2.  
  3. <<#
  4. procedure GenMemStore( stotyp,stostr : string )
  5. begin
  6.   select all fields
  7.   select fields on (fldtyp = stotyp) and (fldals = 'M') and fldget
  8.   if fldtotal > 0
  9.     GenFldList( stostr )
  10.   endif
  11. end GenMemStore
  12.  
  13.  
  14. procedure GenFldStore( stotyp,stostr : string )
  15. begin
  16.   select all fields
  17.   select fields on (fldtyp = stotyp) and (fldals <> 'M') and fldget
  18.   if fldtotal > 0
  19.     GenFldList( stostr )
  20.   endif
  21. end GenFldStore
  22.  
  23.  
  24. procedure GenPrivateFlds( switch : integer )
  25. begin
  26.   select all
  27.   select fields on (fldtyp $ 'CDLN') and (fldals <> 'M') and fldget
  28.   if (fldtotal > 128)
  29.     genln( '* ---Declare field memory variables.' )
  30.     genln( 'DO CASE' )
  31.     forall databases
  32.       filespec( dbfnam,fpath,fname,fext )
  33.       genln( 'CASE dbfarea = "',dbfcount,'"' )
  34.       pushmargin( 1 )
  35.       genln( '* ---Using ',fname,'.',fext )
  36.       if fldtotal > 0
  37.         if switch = 0
  38.           GenFldList( 'PRIVATE;' )
  39.           GenFldStore( 'C','STORE " " TO;' )
  40.           GenFldStore( 'N','STORE 0.00 TO;' )
  41.           GenFldStore( 'L','STORE .F. TO;' )
  42.           GenFldStore( 'D','STORE CTOD("  /  /  ") TO;' )
  43.         else
  44.           GenFldList( 'RELEASE;' )
  45.         endif
  46.       else
  47.         genln( '* ---<No fields>.' )
  48.       endif
  49.       popmargin
  50.     endfor
  51.     genln( 'ENDCASE' )
  52.   endif
  53. end GenPrivateFlds
  54. #>>
  55.  
  56.  
  57. <<procedure GenOutputItems>>  <<*Used in APPE/EDIT prgs*>>
  58. <<begin>>
  59. DO SayLine WITH row,"PRINT:  {L}abel  {R}ecord  <Return> "
  60. DO GetKey WITH choice,"LR"+Returnkey
  61. DO CASE
  62. CASE choice = "L"
  63.    DO {fileprefix}_1LAB WITH row
  64. CASE choice = "R"
  65.    DO {fileprefix}_1RPT WITH row
  66. ENDCASE
  67. <<end GenOutputItems>>
  68.  
  69.  
  70. <<#
  71. procedure GenPageMenu
  72. <<*       1         2         3         4         5
  73. 01234567890123456789012345678901234567890123456789012345
  74. PAGE:   Forward  ({line})  <Return>
  75. *>>
  76. string line
  77. integer col
  78. begin
  79.   forall pages
  80.     if forcount <= 16
  81.       line := line + ' ' + str(pagcount) + ' '
  82.     endif
  83.   endfor
  84. #>>
  85. pagechoice = pageno + 1
  86. <<GenColor( 0,'PROMPT' )>>
  87. @ row, 0 CLEAR
  88. @ row, 0 SAY {"}PAGE:   Forward  ({line})  <Return>{"}
  89. @ row, 8 PROMPT "Forward"
  90. <<#
  91.   col := 18
  92.   forall pages
  93.     if forcount <= 16
  94.       genln( '@ row,',col,' PROMPT " ',pagcount,' "' )
  95.       col := col + 3
  96.     endif
  97.   endfor
  98.   col := col + 3
  99. #>>
  100. @ row,{col} SAY "<Return>"
  101.   <<col := col + 1>>
  102. @ row,{col} PROMPT "Return"
  103. MENU TO pagechoice
  104. <<#
  105.   line := ''
  106.   forall pages
  107.     if pagcount <= 16
  108.       line := line + 'S'
  109.     endif
  110.   endfor
  111. #>>
  112. choice = SUBSTR( Returnkey+PgDn+{"}{line}{"}+Returnkey,pagechoice+1,1 )
  113. <<end GenPageMenu>>
  114.  
  115.  
  116. <<procedure GenPageItems>>  <<*Used in APPE/EDIT prgs*>>
  117. <<begin>>
  118.   <<GenPageMenu>>
  119. lastpage = pageno
  120. DO CASE
  121. CASE choice = PgDn
  122.    DO Page WITH pageno,1,PageMax
  123. CASE choice = "S"
  124.    pageno = pagechoice - 1
  125. ENDCASE
  126. IF pageno <> lastpage
  127.    DO {fileprefix}_FORM
  128.    DO SayRec
  129. ENDIF
  130. <<end GenPageItems>>
  131.  
  132. <<* EOF: APPPRIV.INC *>>
  133.