home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a070 / 3.ddi / FOXPRO / TEMPLGEN / PROFLE.INC < prev    next >
Encoding:
Text File  |  1989-10-23  |  997 b   |  55 lines

  1. <<* Genfle.inc *>>
  2. <<#
  3.  
  4. procedure pushmarg( indentlevel : integer)
  5. begin
  6.  
  7. <<* Save old value on stack *>>
  8.  
  9.   push( lmargin )
  10.  
  11. <<* Indent tab at a time *>>
  12.  
  13.   set lmargin to lmargin + indentlevel
  14. end pushmarg
  15.  
  16. procedure popmarg
  17. Integer margin
  18. begin
  19.  
  20.  
  21. <<* Retrieve old value from stack *>>
  22.  
  23.   pop( margin )
  24.   set lmargin to margin
  25. end popmarg
  26.  
  27. <<* Generate header of procedure file *>>
  28.  
  29. procedure GenHeader( fspec,notes : string )
  30. begin
  31.   filespec( fspec,fpath,fname,fext )
  32.   genln('* Program.: ',fname,'.',fext )
  33.   genln('* Date....: ',DATE )
  34.   genln('* Version.: FoxPro, revision 1.0')
  35.   genln('* Notes...: ',notes )
  36.   genln('* Author..: YOUR NAME HERE!')
  37.   genln('*' )
  38. end GenHeader
  39.  
  40. <<* Opens the output file for this procedure *>>
  41.  
  42. Function Openfile( fspec,notes : string ) : logical
  43. begin
  44.   if rewrite( fspec ) = 0
  45.     genHeader( fspec,notes )
  46.     return true
  47.   else
  48.     return false
  49.   endif
  50. end OpenFile
  51.  
  52. <<* EOD: Profle.inc *>>
  53. #>>
  54.     
  55.