New games every week!
JSE - Getting Stuck
Blog
25th June 2021
I *think* I've fixed the mid-line "IF" bug.
-=-=- I've not uploaded the fix yet, as I've been trying to come up with a hundred or so ways to force it to happen, but .. I think it's fixed..!? It definitely doesn't cope with endifs and elses though. They really confuse the poor thing. But at least the basics works. And since we're aiming for BASIC, that's good enough! Meanwhile..I then got stuck on brackets. Brackets on and brackets off.. if KeyHit or MouseHit then ... doesn't work, because the parser thinks it's.. If KeyHit(or MouseHit) then ... and meanwhile Print (1+2)+3 doesn't work. I call this the "First Bracket Bug", because the parser thinks the initial bracket is the bracket for the function.. it's reading... Print(1+2) and then a random +3 on the end. *sigh* Those bloomin' brackets!! If KeyHit() or MouseHit() ... works fine. Print 1+2+3 .. works also. I keep trying to find ways to "Guess" what the user wants, but every method I try seems to have inadvertant side-effects. Yesterday I completely broke the If command (which I'd just fixed!!) because it started wrapping things up in too many brackets! A simple "If the user hasn't started the thing with a bracket, add in the obviously necessary bracket" doesn't actually work, because.. Sometimes they do, which leads to the "First Bracket" bug. I'm tempted to just write up a little bit of an explanation about this quirk, up at the top of the Command List file, and put it up to simply being "one of those things". A simple "Try to stick to using brackets where appropriate" sort of thing. These darn brackets are doing my head in!!! Views 243, Upvotes 20
Jse
,
Bugs
,
Brackets
New games every week!
|