04-29-2024, 06:51 PM
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.
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.