home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a070 / 3.ddi / FOXPRO / TEMPLGEN / AP1A.GEN < prev    next >
Encoding:
Text File  |  1988-02-09  |  2.2 KB  |  79 lines

  1. <<#pragma
  2.  
  3. <<*---Declare global variables---*>>
  4. string  fpath,fname,fext
  5. string  prgpath,prgname,fileprefix,datafile
  6. logical Simple,Bracketed,LiteBar
  7. logical ismultipage,ismultindx
  8. integer menutype
  9.  
  10. <<*---Used in several routines---*>>
  11. logical ismultials
  12. string  fldprefix
  13.  
  14. <<*---GENHUE vars---*>>
  15. integer lasthue,forecolor,backcolor
  16.  
  17. #>>
  18. <<*---General modules---*>>
  19. <<#include 'GENSAY.INC'#>>   <<*To generate @row,col SAY,etc.*>>
  20. <<#include 'GENBOX.INC'#>>   <<*To generate boxes,etc.*>>
  21. <<#include 'GENHUE.INC'#>>   <<*Contains AtrCode,etc.*>>
  22. <<#include 'GENFLD.INC'#>>   <<*Contains GenLabel,GenField,etc.*>>
  23. <<#include 'GENVARS.INC'#>>  <<*Contains fixfldnam,GenMemVars,etc.*>>
  24. <<#include 'GENFILE.INC'#>>  <<*Contains GenHeader,GenFooter,etc.*>>
  25. <<#include 'GENCOLOR.INC'#>> <<*Contains GenColor*>>
  26. <<*---Specific modules---*>>
  27. <<#include 'Ap1FILE.INC'#>>  <<*General routines used by others*>>
  28. <<#include 'Ap1FORM.INC'#>>
  29. <<#include 'Ap1SAYS.INC'#>>
  30. <<#include 'Ap1GETS.INC'#>>  <<*WriteGetFlds,etc.*>>
  31. <<#include 'Ap1REPL.INC'#>>
  32. <<#include 'Ap1PROC.INC'#>>
  33. <<#include 'Ap1KEYS.INC'#>>
  34. <<#include 'Ap1CALC.INC'#>>
  35. <<#include 'Ap1DRIV.INC'#>>
  36. <<#pragma
  37.  
  38.  
  39. procedure InitVariables
  40. begin
  41.   fldprefix := 'm'
  42.   select all
  43.   ismultipage := (pagtotal > 1)
  44.   ismultials := (dbftotal > 1)
  45.   ismultindx := false
  46.   forall databases
  47.     if ndxtotal > 1
  48.       ismultindx := true
  49.     endif
  50.   endfor
  51.   <<*---Select Menu Type---*>>
  52.   Bracketed := (menutype = 0)  <<*Default, if they press ESC*>>
  53.   Simple    := (menutype = 1)
  54.   Bracketed := (menutype = 2)
  55.   LiteBar   := (menutype = 3)
  56. end <<*InitVariables*>>
  57.  
  58.  
  59. procedure InitFromStack
  60. begin
  61.   <<*---Restore stack variables in REVERSE order---*>>
  62.   pop( prgpath )       <<*Pathname of main program to generate*>>
  63.   pop( prgname )       <<*Filename of main program to generate*>>
  64.   pop( fileprefix )    <<*Three letter file prefix*>>
  65.   pop( datafile )      <<*filename of PRIMARY database file*>>
  66.   pop( menutype )      <<*Menu/Submenu prompt type*>>
  67.   zapstack             <<*Clear it of anything else it might have*>>
  68. end <<*InitFromStack*>>
  69.  
  70.  
  71. begin <<*MAIN*>>
  72.   InitFromStack
  73.   InitVariables
  74.   GenProcedures
  75. end <<*MAIN*>>
  76.  
  77. <<*EOF: APPS.GEN*>>
  78. #>>
  79.