home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a070 / 3.ddi / FOXPRO / TEMPLGEN / AP1STOR.INC < prev    next >
Encoding:
Text File  |  1987-12-20  |  944 b   |  49 lines

  1. <<* APPSTOR.INC *>>
  2. <<#
  3.  
  4. procedure GenStoreBody
  5. begin
  6.   genln( '* ---Initialize memvars with field contents.' )
  7.   forall (fldtyp $ 'CDLN') and (fldals <> 'M')
  8.     genln( 'STORE ',ljust( fldnam,10 ),' TO ',fixfldnam )
  9.   endfor
  10. end GenStoreBody
  11.  
  12.  
  13. <<*
  14. function GetMemVal : string
  15. string line
  16. begin
  17.   if fldini
  18.     RETURN fldini
  19.   else
  20.     if fldtyp = 'C'
  21.       line := 'SPACE(' + str( fldwid,3 ) + ')'
  22.     elsif fldtyp = 'D'
  23.       line := 'CTOD("  /  /  ")'
  24.     elsif fldtyp = 'L'
  25.       line := '.F.'
  26.     else
  27.       if (flddec = 0)
  28.         line := '0         '
  29.       else
  30.         line := '0.00      '
  31.       endif
  32.     endif
  33.     RETURN line
  34.   endif
  35. end GetMemVal
  36.  
  37.  
  38. procedure GenBlankBody
  39. begin
  40.   genln( '* ---Initialize memvars with blanks.' )
  41.   forall (fldtyp $ 'CDLN') and (fldals <> 'M')
  42.     genln( 'STORE ',GetMemVal,' TO ',fixfldnam )
  43.   endfor
  44. end GenBlankBody
  45. *>>
  46.  
  47. <<* EOF: APPSTOR.INC *>>
  48. #>>
  49.