5 ms·
> CONTINUE and BREAK are quite different from GOTO in that they operate predictably given the current scope CONTINUE, BREAK, and GOTO all operate predictably b
by bdowling 4y ago
> CONTINUE and BREAK are quite different from GOTO in that they operate predictably given the current scope
CONTINUE, BREAK, and GOTO all operate predictably because they are deterministic operations. Each continues program execution at the directed explicit (goto) or implicit (continue or break) offset. There is no non-deterministic or unpredictable behavior whatsoever.
- josefx 4y ago> operate predictably because they are deterministic operations If I sat you in front of a computer generating numbers using a pseudo random number generator and gave you as context the last number it generated, could you make any prediction about the next number it generates? Now if it used a prng that was known and standardized to only compute one number could you predict anything about the next number now?
- deleted 4y ago[deleted]
- lolinder 4y agoPredictably may have been the wrong word, because that does imply non-determinism. It might be better to say that CONTINUE and BREAK are limited: given a scope, the keyword can take you to exactly one place, while GOTO could be used to take you anywhere, and you have to go hunting for the corresponding label to find that place.