Broke my editor somehow???

212

Senior Member
Last night I was working on my code. I was changing some things around, and trying different ideas I have on how to do things. I had my "main" saying

main:

do while pin3 = 1
loop
goto recheck

This passed the syntax check and ran in the editor too....although it may still be wrong I guess. I was working on another part of the code, and when I checked the syntax again, it said I had do without a loop...in main....remember it had done fine several times before, when checking other parts. OK...I commented out the do and the loop...see picture. Now I get the error shown in the other picture here???

I copied the code and pasted it into "WORD" thinking it might get rid of something unseen, but when I re-copied that back to a new basic, I get the same thing. I'll try to answer questions about this if I need to, but what in the world did I break???

ooops...version 5.2.1
 

Attachments

Last edited:

212

Senior Member
Ha! Look at the picture....recheck has do without a loop. The editor might have an issue pointing out where the problem is in the code???

I'll work on my part, but maybe the editor needs a pair of glasses too lol...
 

Jeremy Leach

Senior Member
Very strange - nothing wrong with your code as far as I can see. I typed up the first section of your code from your photo and didn't get any error - but I don't think that says much, because the checker will be scanning your code in it's entirety. How about when you restart the editor?
 

hippy

Ex-Staff (retired)
Your mistake appears to be in line 18.

Unfortunately there is only so much a compiler can do in second guessing what code was intended to be rather than is and especially when trying to match up unbalanced do-loop constructs. This is one of those cases where the compiler 'sees' your code differently to how you see it.
 

212

Senior Member
No doubt the editor was seeing my mistake, but in the past it would correctly highlight the problem for me. In this case, it was highlighting the wrong lines. I was looking up higher in the code and not where the problem really was, because it had always pointed to the right place before. I did restart the editor, restart the computer, and restart my brain again, but never saw the actual error till after posting about it. I could comment out line 1, 10 and 11, and it would check out OK...even though the real problem was line 18, like hippy pointed out.

I'm still happy as can be with the editor, I'll just have to keep in mind that it's not perfect, is all.
 
Top