Re: break bug

new topic     » goto parent     » topic index » view thread      » older message » newer message
jimcbrown said...
ghaberek said...
bryanso said...

The introduction of break statement, causing a confusion between break and exit, seems to violate the principle of "say no to complicated programming".

I suppose this started because we only had exit for the longest time. And only with the recent addition of switch did we gain break.

-Greg

The reason we came up with a new keyword for switch, instead of simply reusing exit, is to allow the user to embed a switch statement inside of a loop but then use the exit keyword inside of the switch to break out of the loop.


But only if you use "with fallthru" keywords! Anything to make a goto but using different letters, eh?

switch x with fallthru  
case a: -- blah blah code 
case b: -- blah blah code 
i wanna leave here, was it exit or break? 
case c: -- blah blah code 
end switch 

But imagine the horrors of not having "case", "switch", "exit", "break", and "with fallthru":

goto x 
:a -- blah blah code 
:b -- blah blah code ; goto :end_x 
:c -- blah blah code 
:end_x 

useless

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu