home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a046 / 5.img / TEMPLATE / SSB00.GEN < prev    next >
Encoding:
Text File  |  1992-04-01  |  3.6 KB  |  128 lines

  1. <<* SSB02.GEN *>>
  2. <<* (C) 1991 SHEN YANG WHITE HORSE SOFTWART COMPANY  *>>
  3. <<#pragma
  4.  
  5. <<*---Declare global variables---*>>
  6. string  fpath,fname,fext
  7. string  prgpath,prgname,fileprefix,datafile
  8. string  FuncStatus1,FuncStatus2,FuncStatus3,FuncStatus4
  9. string  FuncStatus5,FuncStatus6,FuncStatus7,FuncStatus8
  10. string  FuncLable1,FuncLable2,FuncLable3,FuncLable4
  11. string  FuncLable5,FuncLable6,FuncLable7,FuncLable8
  12. string  MenuLinehdg
  13. logical Simple,Bracketed,LiteBar
  14. logical ismultipage,ismultials,ismultindx
  15.  
  16. <<*---OPEN vars---*>>
  17. integer SCREENWIDTH
  18.  
  19. <<*---BROWSE vars---*>>
  20. integer SCREENWIDTH
  21. integer PageIndent,PageWidth,panmax
  22. logical IsBigWid
  23. integer headlen,datalen
  24.  
  25. <<*---GENVARS vars---*>>
  26. string  fldprefix
  27.  
  28. <<*---FEATURE vars---*>>
  29. integer features
  30. integer featals,featlabel
  31.  
  32.  
  33. function feat( num : integer ) : logical
  34. <<*16-bit feature combinations (1...16)*>>
  35. <<*bits: 1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,-32768*>>
  36. begin
  37.   RETURN (features and num) <> 0
  38. end feat
  39.  
  40. #>>
  41. <<*---General modules---*>>
  42. <<#include 'GENSAY.INC'#>>   <<*To generate @row,col SAY,etc.*>>
  43. <<#include 'GENSTR.INC'#>>   <<*General string functions*>>
  44. <<#include 'GENVARS.INC'#>>  <<*Contains fixfldnam,GenMemVars,etc.*>>
  45. <<#include 'GENFILE.INC'#>>  <<*Contains GenHeader,GenFooter,etc.*>>
  46. <<#include 'GENCOLOR.INC'#>> <<*Contains GenColor,etc.*>>
  47. <<*---Application---*>>
  48. <<#include 'SSBPRIV.INC'#>>  <<*Special routines for APPE/EDIT*>>
  49. <<#include 'SSBMENU.INC'#>>
  50.  
  51. <<#pragma
  52.  
  53. procedure GenPrograms
  54. string  fspec,filename
  55. begin
  56.   filename := 'Operation was selected'
  57.   fspec := fileprefix + '0.PRG'
  58.   if OpenFile( fspec,'MENU program for ' + filename )
  59.     GenSBMenuBody
  60.     GenFooter( fspec )
  61.   endif
  62. end <<*GenPrograms*>>
  63.  
  64.  
  65. procedure InitVariables
  66. begin
  67.   select databases 1
  68. <<* --- Function status --- *>>
  69.     FuncStatus1 := substr( dbfusr,1,1 )
  70.     FuncStatus2 := substr( dbfusr,2,1 )
  71.     FuncStatus3 := substr( dbfusr,3,1 )
  72.     FuncStatus4 := substr( dbfusr,4,1 )
  73.     FuncStatus5 := substr( dbfusr,5,1 )
  74.     FuncStatus6 := substr( dbfusr,6,1 )
  75.     FuncStatus7 := substr( dbfusr,7,1 )
  76.     FuncStatus8 := substr( dbfusr,8,1 )
  77.  
  78. <<* --- Function lable  ---- *>>
  79.     FuncLable1 := substr( dbfusr,9,8 )
  80.     FuncLable2 := substr( dbfusr,17,8 )
  81.     FuncLable3 := substr( dbfusr,25,8 )
  82.     FuncLable4 := substr( dbfusr,33,8 )
  83.     FuncLable5 := substr( dbfusr,41,8 )
  84.     FuncLable6 := substr( dbfusr,49,8 )
  85.     FuncLable7 := substr( dbfusr,57,8 )
  86.     FuncLable8 := substr( dbfusr,65,8 )
  87.     MenuLinehdg  := substr ( dbfusr,73,(len( dbfusr ) - 72) )
  88.  
  89. <<* --- Clear spaces into string of Function lable  --- *>>
  90.     FuncLable1 := ltrim( rtrim( FuncLable1 ))
  91.     FuncLable2 := ltrim( rtrim( FuncLable2 ))
  92.     FuncLable3 := ltrim( rtrim( FuncLable3 ))
  93.     FuncLable4 := ltrim( rtrim( FuncLable4 ))
  94.     FuncLable5 := ltrim( rtrim( FuncLable5 ))
  95.     FuncLable6 := ltrim( rtrim( FuncLable6 ))
  96.     FuncLable7 := ltrim( rtrim( FuncLable7 ))
  97.     FuncLable8 := ltrim( rtrim( FuncLable8 ))
  98.  
  99.  
  100.   SCREENWIDTH := 0
  101.   fldprefix := 'm'   <<*FIELD_NAME prefix when using memvars*>>
  102.   <<*---Init Product logical vars---*>>
  103.   select all
  104.   ismultipage := (pagtotal > 1)
  105.   ismultials := (dbftotal > 1)
  106.   ismultindx := false
  107.   forall databases
  108.     if ndxtotal > 1
  109.       ismultindx := true
  110.     endif
  111.   endfor
  112.   featlabel := 2
  113.   filespec( prgname,fpath,fname,fext )
  114.   fileprefix := substr( fname,1,7 )
  115. end <<*InitVariables*>>
  116.  
  117.  
  118. begin <<*MAIN*>>
  119.   prgname := Table
  120.   if prgname
  121.      InitVariables
  122.      GenPrograms
  123.   endif
  124. end
  125.  
  126. <<*EOF: SSB02.GEN*>>
  127. #>>
  128.