New games every week!
JSE - BODMAS Enhancements Blog
7th May 2021
I think I've done it!!

-=-=-



// Latest BODMAS Test Graphics 640,480,1 SetFontSize(16) repeat cls 80,30,30 Print "Bodmas Test" Print "1+2*3" Print Print 1+2*3+" <- Works" Print " "+1+2*3+" <- Incorrectly assumes first '1 +' should be acting as a string" // The result is "1" + (2*3) which is "1"+6, "16".. // In this case, I think I'm ok with it doing this. // I'm not really sure how else it should handle it. Print " "+(1+2*3)+" <- Works fine" Print (1+2)*3+" <- Doesn't work.." // Incorrectly thinks you're asking // Print(1+2) then adding random stuff // on the end of the line, // for no apparent reason! Print ((1+2)*3+" <- Does work.") // This time it knows what you're asking. Print If MouseX()>ScreenWidth()/2 and MouseY()<ScreenHeight()/2 then Rect ScreenWidth()*0.5,0,ScreenWidth*0.5,ScreenHeight()/2 // Move your mouse over the top right to make it white. This line used to confuse the heck out of the poor thing! a=Mills()%1000<500 Print a+" <- Mills()%1000<500 - placed into a variable, then displayed" flip forever


It's getting harder and harder to trip it up. It's still possible, but it's definitely getting harder.
BODMAS is (as far as I'm aware!) functioning the way it's meant to be, and my code is now happily running with infinitely less brackets getting in the way.

I'll probably fiddle about with this a bit more, to see if I can solve those last few issues, but the more I think about it, the less important those aspects appear to be.
Views 89, Upvotes 12  
Daily Blog
New games every week!
Site credits : Jayenkai
(c) Jayenkai 2023 and onwards, RSS feed 77

Blog - JSE - BODMAS Enhancements - AGameAWeek