QB64 Phoenix Edition
An IDE anomoly detected - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11)
+--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2)
+--- Thread: An IDE anomoly detected (/showthread.php?tid=2635)



An IDE anomoly detected - TerryRitchie - 04-29-2024

I happen to be writing a new section for the tutorial that highlights the use of the IDE and as such I am paying close attention to the IDE output screens.

I noticed something odd. Type the following line of code into the IDE and then press ENTER:

FOR x% = 1 TO 10

The IDE is reporting the line of code as an error as it should "FOR without NEXT" in the status window. However the second line in the Status window is a bit strange:

"Caused by (or after): SUB VWATCH ( )"

Is the second line reporting correctly?


RE: An IDE anomoly detected - bplus - 04-29-2024

oh that is weird, never noticed before


RE: An IDE anomoly detected - FellippeHeitor - 04-29-2024

Sub vwatch is always there. If you have $debug, the hidden sub will contain the debug features. If not, the hidden sub will be just a stub, so you can’t have a conflicting sub vwatch of your own.


RE: An IDE anomoly detected - TerryRitchie - 04-29-2024

(04-29-2024, 04:53 PM)FellippeHeitor Wrote: Sub vwatch is always there. If you have $debug, the hidden sub will contain the debug features. If not, the hidden sub will be just a stub, so you can’t have a conflicting sub vwatch of your own.
Oh sure, I understand what VWATCH is and does in relation to the IDE and debugging, I'm just wondering if that line should read:

"Caused by (or after): FOR" 

instead of

"Caused by (or after): SUB VWATCH ( )"


RE: An IDE anomoly detected - SMcNeill - 04-29-2024

Think of it as:

FOR I = 1 TO 10
   
    SUB Foo
    END SUB

NEXT

Now, is that error the fault of FOR?  It's got a proper NEXT to it; it's just a silly SUB out of place!

As far as the IDE is concerned, that's your glitch here.  It reads down, from top to bottom, and stops and tosses an error at the first problem it finds. In the above, it never really knows if there's a NEXT, or not, as it errors on SUB foo before it can verify things.

The only issue with SUB vwatch is it's hidden and not part of the user's code.  Makes for some confusing feedback when it's referencing an invisible module.  Wink