3 ms·
Ehhh. Continue, break, return at least are well-formed with respect to the local environment. GOTO has no such restrictions (well, in older languages allowing
by pnathan 15y ago
Ehhh.
Continue, break, return at least are well-formed with respect to the local environment.
GOTO has no such restrictions (well, in older languages allowing arbitrary GOTOs)... that's why its considered harmful.
The single-return principle is used for flowcharts & formal analysis ease.
It'd be mildly interesting to do a retrospective of compilation & static analysis algorithms to see what more current research turns up with respect to the single-return rule's use.