home *** CD-ROM | disk | FTP | other *** search
- <<* SSB02.GEN *>>
- <<* (C) 1991 SHEN YANG WHITE HORSE SOFTWART COMPANY *>>
- <<#pragma
-
- <<*---Declare global variables---*>>
- string fpath,fname,fext
- string prgpath,prgname,fileprefix,datafile
- string FuncStatus1,FuncStatus2,FuncStatus3,FuncStatus4
- string FuncStatus5,FuncStatus6,FuncStatus7,FuncStatus8
- string FuncLable1,FuncLable2,FuncLable3,FuncLable4
- string FuncLable5,FuncLable6,FuncLable7,FuncLable8
- string MenuLinehdg
- logical Simple,Bracketed,LiteBar
- logical ismultipage,ismultials,ismultindx
-
- <<*---OPEN vars---*>>
- integer SCREENWIDTH
-
- <<*---BROWSE vars---*>>
- integer SCREENWIDTH
- integer PageIndent,PageWidth,panmax
- logical IsBigWid
- integer headlen,datalen
-
- <<*---GENVARS vars---*>>
- string fldprefix
-
- <<*---FEATURE vars---*>>
- integer features
- integer featals,featlabel
-
-
- function feat( num : integer ) : logical
- <<*16-bit feature combinations (1...16)*>>
- <<*bits: 1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,-32768*>>
- begin
- RETURN (features and num) <> 0
- end feat
-
- #>>
- <<*---General modules---*>>
- <<#include 'GENSAY.INC'#>> <<*To generate @row,col SAY,etc.*>>
- <<#include 'GENSTR.INC'#>> <<*General string functions*>>
- <<#include 'GENVARS.INC'#>> <<*Contains fixfldnam,GenMemVars,etc.*>>
- <<#include 'GENFILE.INC'#>> <<*Contains GenHeader,GenFooter,etc.*>>
- <<#include 'GENCOLOR.INC'#>> <<*Contains GenColor,etc.*>>
- <<*---Application---*>>
- <<#include 'SSBPRIV.INC'#>> <<*Special routines for APPE/EDIT*>>
- <<#include 'SSBMENU.INC'#>>
-
- <<#pragma
-
- procedure GenPrograms
- string fspec,filename
- begin
- filename := 'Operation was selected'
- fspec := fileprefix + '0.PRG'
- if OpenFile( fspec,'MENU program for ' + filename )
- GenSBMenuBody
- GenFooter( fspec )
- endif
- end <<*GenPrograms*>>
-
-
- procedure InitVariables
- begin
- select databases 1
- <<* --- Function status --- *>>
- FuncStatus1 := substr( dbfusr,1,1 )
- FuncStatus2 := substr( dbfusr,2,1 )
- FuncStatus3 := substr( dbfusr,3,1 )
- FuncStatus4 := substr( dbfusr,4,1 )
- FuncStatus5 := substr( dbfusr,5,1 )
- FuncStatus6 := substr( dbfusr,6,1 )
- FuncStatus7 := substr( dbfusr,7,1 )
- FuncStatus8 := substr( dbfusr,8,1 )
-
- <<* --- Function lable ---- *>>
- FuncLable1 := substr( dbfusr,9,8 )
- FuncLable2 := substr( dbfusr,17,8 )
- FuncLable3 := substr( dbfusr,25,8 )
- FuncLable4 := substr( dbfusr,33,8 )
- FuncLable5 := substr( dbfusr,41,8 )
- FuncLable6 := substr( dbfusr,49,8 )
- FuncLable7 := substr( dbfusr,57,8 )
- FuncLable8 := substr( dbfusr,65,8 )
- MenuLinehdg := substr ( dbfusr,73,(len( dbfusr ) - 72) )
-
- <<* --- Clear spaces into string of Function lable --- *>>
- FuncLable1 := ltrim( rtrim( FuncLable1 ))
- FuncLable2 := ltrim( rtrim( FuncLable2 ))
- FuncLable3 := ltrim( rtrim( FuncLable3 ))
- FuncLable4 := ltrim( rtrim( FuncLable4 ))
- FuncLable5 := ltrim( rtrim( FuncLable5 ))
- FuncLable6 := ltrim( rtrim( FuncLable6 ))
- FuncLable7 := ltrim( rtrim( FuncLable7 ))
- FuncLable8 := ltrim( rtrim( FuncLable8 ))
-
-
- SCREENWIDTH := 0
- fldprefix := 'm' <<*FIELD_NAME prefix when using memvars*>>
- <<*---Init Product logical vars---*>>
- select all
- ismultipage := (pagtotal > 1)
- ismultials := (dbftotal > 1)
- ismultindx := false
- forall databases
- if ndxtotal > 1
- ismultindx := true
- endif
- endfor
- featlabel := 2
- filespec( prgname,fpath,fname,fext )
- fileprefix := substr( fname,1,7 )
- end <<*InitVariables*>>
-
-
- begin <<*MAIN*>>
- prgname := Table
- if prgname
- InitVariables
- GenPrograms
- endif
- end
-
- <<*EOF: SSB02.GEN*>>
- #>>
-