Just starting out? Need help? Post your questions and find answers here.
Num3
Posts: 22 Joined: Wed Apr 09, 2014 7:09 pm
Post
by Num3 » Sun Feb 19, 2017 12:48 pm
It's me again xD
I think unclosed keywords should have precedence to invalid placement rules, take this example.
You will never be able to stop the bad IF, if it is somewhere else far away on the code.
Code: Select all
If test
;
; Gazilion lines of code
;
Procedure upsss() ; Error checking at first procedure inside the IF keyword
EndProcedure
Fred
Site Admin
Posts: 1821 Joined: Mon Feb 24, 2014 10:51 am
Post
by Fred » Mon Feb 20, 2017 7:07 am
Not a bug, the error is properly reported
.
Num3
Posts: 22 Joined: Wed Apr 09, 2014 7:09 pm
Post
by Num3 » Tue Feb 21, 2017 6:05 pm
Yes, the error is correct.
My argument is that the unclosed IF should be reported first, because it has precedence.
Fred
Site Admin
Posts: 1821 Joined: Mon Feb 24, 2014 10:51 am
Post
by Fred » Wed Feb 22, 2017 8:00 am
The compiler stops at the first encounter error. It doesn't even know you didn't closed the If, as it didn't go further.