BASIC compiler/interpreter for PIC32MX/MZ-80K
修訂 | 427dfe0e2b56363012af502231e89f44c7f814ef (tree) |
---|---|
時間 | 2019-02-16 04:31:39 |
作者 | Katsumi <kmorimatsu@sour...> |
Commiter | Katsumi |
Recursive static vars test code.
@@ -229,31 +229,34 @@ static const char initext[]= | ||
229 | 229 | |
230 | 230 | |
231 | 231 | static const char bastext[]= |
232 | -"USECLASS CLASS1\n" | |
232 | +"USECLASS CLASS1,CLASS2\n" | |
233 | 233 | "CLS\n" |
234 | -"a=new(CLASS1)" | |
235 | -"print a.T1()\n" | |
236 | -"\n" | |
234 | +"CLASS1::T1=123\n" | |
235 | +"CLASS2::T2=456\n" | |
236 | +"print CLASS1::T3(),\n" | |
237 | +"print CLASS2::T4(),\n" | |
238 | +"print CLASS1::T5(),\n" | |
239 | +"print CLASS2::T6(),\n" | |
237 | 240 | "\n" |
238 | 241 | "\n"; |
239 | 242 | |
240 | 243 | static const char class1text[]= |
244 | +"STATIC T1\n" | |
241 | 245 | "useclass CLASS2\n" |
242 | -"field private T2\n" | |
243 | -"method INIT\n" | |
244 | -" T2=new(CLASS2)\n" | |
245 | -" return\n" | |
246 | -"METHOD T1\n" | |
247 | -" return T2.T1()\n" | |
248 | 246 | "method T3\n" |
249 | -" return 456\n" | |
247 | +" return CLASS2::T2\n" | |
248 | +"method T5\n" | |
249 | +" return T1\n" | |
250 | 250 | "\n" |
251 | 251 | "\n"; |
252 | 252 | |
253 | 253 | static const char class2text[]= |
254 | +"STATIC T2\n" | |
254 | 255 | "useclass CLASS1\n" |
255 | -"method T1\n" | |
256 | -" return CLASS1::T3()\n" | |
256 | +"method T4\n" | |
257 | +" return CLASS1::T1\n" | |
258 | +"method T6\n" | |
259 | +" return T2\n" | |
257 | 260 | "\n" |
258 | 261 | "\n" |
259 | 262 | "\n" |