home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a040 / 2.ddi / SHRWARE4.ARC / MSAA.GEN < prev    next >
Encoding:
Text File  |  1988-06-03  |  2.3 KB  |  82 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 Fox
  8. logical ismultipage,ismultindx
  9. integer menutype
  10.  
  11. <<*---Used in several routines---*>>
  12. logical ismultials
  13. string  fldprefix
  14.  
  15. <<*---GENHUE vars---*>>
  16. integer lasthue,forecolor,backcolor
  17.  
  18. #>>
  19. <<*---General modules---*>>
  20. <<#include 'GENSAY.INC'#>>   <<*To generate @row,col SAY,etc.*>>
  21. <<#include 'GENBOX.INC'#>>   <<*To generate boxes,etc.*>>
  22. <<#include 'GENHUE.INC'#>>   <<*Contains AtrCode,etc.*>>
  23. <<#include 'GENFLD.INC'#>>   <<*Contains GenLabel,GenField,etc.*>>
  24. <<#include 'GENVARS.INC'#>>  <<*Contains fixfldnam,GenMemVars,etc.*>>
  25. <<#include 'GENFILE.INC'#>>  <<*Contains GenHeader,GenFooter,etc.*>>
  26. <<#include 'GENCOLOR.INC'#>> <<*Contains GenColor*>>
  27. <<*---Specific modules---*>>
  28. <<#include 'msaFILE.INC'#>>  <<*General routines used by others*>>
  29. <<#include 'msaFORM.INC'#>>
  30. <<#include 'msaSAYS.INC'#>>
  31. <<#include 'msaGETS.INC'#>>  <<*WriteGetFlds,etc.*>>
  32. <<#include 'msaREPL.INC'#>>
  33. <<#include 'msaPROC.INC'#>>
  34. <<#include 'msaKEYS.INC'#>>
  35. <<#include 'msaCALC.INC'#>>
  36. <<#include 'msaDRIV.INC'#>>
  37. <<#pragma
  38.  
  39.  
  40. procedure InitVariables
  41. begin
  42.   fldprefix := 'm'
  43.   <<*---Init Product logical vars---*>>
  44.   Fox     := (ProductCode = 1)
  45.   select all
  46.   ismultipage := (pagtotal > 1)
  47.   ismultials := (dbftotal > 1)
  48.   ismultindx := false
  49.   forall databases
  50.     if ndxtotal > 1
  51.       ismultindx := true
  52.     endif
  53.   endfor
  54.   <<*---Select Menu Type---*>>
  55.   Bracketed := (menutype = 0)  <<*Default, if they press ESC*>>
  56.   Simple    := (menutype = 1)
  57.   Bracketed := (menutype = 2)
  58.   LiteBar   := (menutype = 3)
  59. end <<*InitVariables*>>
  60.  
  61.  
  62. procedure InitFromStack
  63. begin
  64.   <<*---Restore stack variables in REVERSE order---*>>
  65.   pop( prgpath )       <<*Pathname of main program to generate*>>
  66.   pop( prgname )       <<*Filename of main program to generate*>>
  67.   pop( fileprefix )    <<*Three letter file prefix*>>
  68.   pop( datafile )      <<*filename of PRIMARY database file*>>
  69.   pop( menutype )      <<*Menu/Submenu prompt type*>>
  70.   zapstack             <<*Clear it of anything else it might have*>>
  71. end <<*InitFromStack*>>
  72.  
  73.  
  74. begin <<*MAIN*>>
  75.   InitFromStack
  76.   InitVariables
  77.   GenProcedures
  78. end <<*MAIN*>>
  79.  
  80. <<*EOF: MSAA.GEN*>>
  81. #>>
  82.