_CONTINUE is a goto replacement for loops
Quick and dirty GOTO.Lol, Seriously, i never knew!!! (Hmmmmm....)(sarcasm Felippe?)
I don't oppose a _BREAK be added to the language for SELECT CASE blocks
it could serve as a general alias for EXIT DO/WHILE/FOR as well.Is an even better implementation so i'd support that!
so I am very interesting to understand in what CASE a _BREAK can be usefulI cant remember why i wanted it but it came up when i was coding something recently so as i couldnt find a built in command i found it resonable to request it, i suppose it's just down to individual coding techniques (the way we each like to code)rather than an absolutley needed command.
I want be clear, I am not against this, but curious about its
SELECT EVERYCASE x$
CASE "A"
z = z + 1
IF z = 3 then EXIT SELECT
y = y + 2
CASE "B"
CASE "C"
END SELECT
_CONTINUE is a goto replacement for loops, I don't oppose a _BREAK be added to the language for SELECT CASE blocks, it could serve as a general alias for EXIT DO/WHILE/FOR as well. Let's see how discussion in this thread progresses.
Why would you need to again?
SELECT CASE is little more than a suped up IF\THEN.
There should be no need to 'break' out of a SELECT CASE. As it is only going to run a matching case anyway.
In case (sorry), one case is really long but there is a condition in which the long part of the case can be skipped.
The good thing is that there's no new keyword added to the language. Just a new way to use them, which won't hurt anyone at all.
My point when I ask if anyone has anything to add at this point is anything technical regarding the implementation as it's been showcased above.
As long as we’re implementing this, can we also get an EXIT <counter> command?
Or maybe an EXIT TO label statement? That could be useful too.
FOR I
FOR J
FOR K
EXIT TO foo
NEXT
NEXT
foo:
NEXT
https://www.qb64.org/portal/development-build-changelog/
Trying to "break" exit caseCode: QB64: [Select]
'EXIT SELECT
using Dev version f3b92c3 Windows 10 x64
I thought 3 x BEEPS was to be the result.
Code: QB64: [Select]
Code: QB64: [Select]