Forum Discussion
In respect to an application. There are times that
Conditions prevail esp in event loops where you
Don't want something to occur under certain
Conditions. In those cases you may have to wrap
Successive statements in an if statement. Where it would
Be easier to just to use continue. As stared this
Can be done with a jump and is how the underlying
Instructions are executed but I'm not comfortable with
Goto for some reason
- JesUltra2 years agoStreaming Star
I do not know when it was introduced, but the current Brightscript reference lists "CONTINUE FOR" and "CONTINUE WHILE" statements. (With oddly no mention of "BREAK".)
https://developer.roku.com/docs/references/brightscript/language/program-statements.md
- renojim2 years agoCommunity Streaming Expert
There's no break, but there is "exit while". Are you saying that break is supported?
This is a ten year old thread, so a lot has changed.
- JesUltra2 years agoStreaming Star
I was merely saying that I did not find mention of "BREAK" in the current BrightScript documentation.
You are right to point out that "EXIT FOR" and "EXIT WHILE" is how you break out of a loop. So it seems that modern BrightScript indeed has support for both continue/break, but does not yet directly support any select/switch kind of branching.
I realize this is a very old thread, but Google sent me here when I was looking for the equivalent of continue/break for BrightScript, so I feel it is worth updating the thread with the recent relevant information.