Report Bugs Here

Moderator: Mmiscool

User avatar
By Mmiscool
#52902 In the example it interpreters t as a string since it has not been populated with a value yet.

Best to put some thing in a variable before doing any if then statements with it.

BTW. Update tonight significantly increases interpreter speed.

Code: Select allt = 0
[poo]
if t = 0 then
t = 1
else
t = 0
end if
goto [poo]
User avatar
By raintime
#52911 WOW! Great Speed Increase! Thanks much!
BUT - HERE IS A BUG THAT NEEDS FIX, (since you asked):

Even with the new build, this simple program (1) does not bring up the debugger [get BLANK SCREEN when hit RUN] (2) makes BASIC go completely out to lunch! Only choice is to press reset. Please try it and see:

debugon
t = 0
[poo]
if t = 0 then
t = 1
else
t = 0
end if
goto [poo]

NOTE: Even with the debugon statement not in the program, it still requires a painful RESET. Try pressing the browser BACK arrow - yes you can get back to what looks like the EDITOR SCREEN, but trying to press, for example [FILE MANAGER] from that screen does absolutely nothing. The only choice is to RESET the nodemcu. Can anything be done about this?
User avatar
By Mmiscool
#52912 That program will never give the debugger a chance to load. You put in to endless looooooooop.
User avatar
By raintime
#52915 That is not (in my humble opinion) a good answer!

Yes, how many students will experience creating infinite loop situations? The debugger should pop up BEFORE the program starts running, and then show that an infinite loop is happening, and allow us to STOP the program by pressing a STOP button!

And even if the debugger is NOT being used, there should be a way to stop a program without having to hit RESET. But at least, when the debugger is being used, this is what a debugger is for!