Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #lang "fblite"
- Option GoSub
- sub parsecfg(Key as string,Value as string)
- call debugviewer(Key+"="+Value)
- 10000 'parse configuration file
- 10001 select case ucase(Key)
- 10100 'integers
- 'define _macro_
- 'ifdef _macro_
- ' Special statements for debugging
- 'endif
- #define _macro_
- #ifdef _macro_
- 10101 case is = "WD":WD=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10102 case is = "MP":MP=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10103 case is = "XP":XP=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10104 case is = "YP":YP=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10105 case is = "PS":PS=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10106 case is = "XX":XX=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10107 case is = "YY":YY=val(Value):exit select '
- #endif
- #define _macro_
- #ifdef _macro_
- 10108 case is = "TT":TT=val(Value):exit select '
- #endif
- #define _macro_
- #ifdef _macro_
- 10109 case is = "RI":RI=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10110 case is = "T1":T1=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10111 case is = "T2":T2=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10112 case is = "PL":PL=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10113 case is = "PC":PC=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10114 case is = "T":T=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10115 case is = "AA":AA=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10116 case is = "DD":DD=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10117 case is = "XS":XS=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10118 case is = "YS":YS=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10119 case is = "TTT":TTT=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10120 case is = "XX1":XX1=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10121 case is = "YY1":YY1=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10122 case is = "XX2":XX2=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10123 case is = "YY2":YY2=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10124 case is = "X1":X1=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10125 case is = "Y1":Y1=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10126 case is = "X2":X2=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10127 case is = "Y2":Y2=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10128 case is = "F":F=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10129 case is = "PG0":PG0=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10130 case is = "PG1":PG1=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10131 case is = "PG2":PG2=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10132 case is = "PG3":PG3=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10133 case is = "PG4":PG4=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10134 case is = "DC":DC=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10135 case is = "ADCT":ADCT=val(Value):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10136 case is = "RSCT":RSCT=val(Value):exit select
- #endif
- 10200 'strings
- #define _macro_
- #ifdef _macro_
- 10201 case is = "FL":FL=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10202 case is = "F1":F1=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10203 case is = "NM":NM=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10204 case is = "F2":F2=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- '10205 case is = "RS":RS=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10206 case is = "CM":CM=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10207 case is = "C":C=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10208 case is = "PCS":PCS=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10209 case is = "M":M=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10210 case is = "MF":MF=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10211 case is = "MX":MX=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10212 case is = "V":V=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10213 case is = "VF":VF=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- '10214 case is = "SP":SP=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10215 case is = "BS":BS=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10216 case is = "FS":FS=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- '10217 case is = "PA":PA=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10218 case is = "LNS":LNS=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10219 case is = "L":L=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10220 case is = "US":US=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10222 case is = "AAX":AAX=Value:exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10223 case is = "AAY":AAY=Value:exit select
- #endif
- 10300 'key strokes
- #define _macro_
- #ifdef _macro_
- 10301 case is = "KBKS":KBKS=string$(1,chr$(val(Value))):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10302 case is = "KTAB":KTAB=string$(1,chr$(val(Value))):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10303 case is = "KESC":KESC=string$(1,chr$(val(Value))):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10304 case is = "KSPC":KSPC=string$(1,chr$(val(Value))):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10305 case is = "LB": LB=string$(1,chr$(val(Value))):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10306 case is = "PA": PA=string$(1,chr$(val(Value))):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10307 case is = "RB": RB=string$(1,chr$(val(Value))):exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10308 case is = "SP": SP=string$(1,chr$(val(Value))):exit select
- #endif
- 10400 'Tasks
- #define _macro_
- #ifdef _macro_
- 10401 case is = "SCMainLoad": SCTasks(SCMainLoad)=Value: exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10402 case is = "SCMainOpen": SCTasks(SCMainOpen)=Value: exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10403 case is = "SCMainWait": SCTasks(SCMainWait)=Value: exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10404 case is = "SCMainKeys": SCTasks(SCMainKeys)=Value: exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10405 case is = "SCMainExit": SCTasks(SCMainExit)=Value: exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10406 case is = "SCMainCode": SCTasks(SCMainCode)=Value: exit select
- #endif
- 10500 'Graphics
- #define _macro_
- #ifdef _macro_
- 10501 case is = "Resolution.X": Resolution.X=val(Value): exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10502 case is = "Resolution.Y": Resolution.X=val(Value): exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10503 case is = "Resolution.Depth": Resolution.Depth=val(Value): exit select
- #endif
- #define _macro_
- #ifdef _macro_
- 10504 case is = "Resolution.Pages": Resolution.Pages=val(Value): exit select
- #endif
- 10600 'debug
- #define _macro_
- #ifdef _macro_
- 10604 case is = "debug": debug=val(Value): exit select
- #endif
- 10900 end select
- end sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement