Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
An IDE anomoly detected
#1
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?
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#2
oh that is weird, never noticed before
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply
#3
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.
Reply
#4
(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 ( )"
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#5
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  IDE suggestions / editor questions madscijr 14 2,345 05-01-2025, 12:56 PM
Last Post: madscijr
  IDE almost flatlines 4 of 4 cpus - linux - any cure? desA 5 1,047 07-28-2024, 02:49 PM
Last Post: bplus
  Viewing SUBs in IDE TerryRitchie 0 471 05-27-2024, 06:24 PM
Last Post: TerryRitchie
  Question about Window Width in IDE menu TerryRitchie 3 681 05-09-2024, 05:38 PM
Last Post: TerryRitchie
  Typo in IDE ASCII Chart TerryRitchie 4 933 05-08-2024, 02:31 PM
Last Post: Dimster

Forum Jump:


Users browsing this thread: