| Next | Program
Repair Shop ![]() |
214 |
This is a very common pattern
if (some operation succeeds) {
do the next operation;
} else {
display an error message
}
Often it's better to break out of the normal flow immedately:
unless (some operation successds) {
display an error message
next OR last OR return OR die
}
do the next operation
Control flow remains simple and linear in the normal case
| Next | ![]() |
Copyright © 2002 M. J. Dominus |