2 ms·
I agree that in C, the disciplined use of goto is the way to go, but the "ok so far" version could be better written: if (oksofar) { oksofar = some
by jejones3141 4y ago
I agree that in C, the disciplined use of goto is the way to go, but the "ok so far" version could be better written:
if (oksofar) {
oksofar = something_done = do_something(bar);
}
if (oksofar) {
oksofar = stuff_inited = init_stuff(bar);
}
and so forth.
- mytailorisrich 4y agoOr even oksofar = oksofar && do_something() to do away with the cumbersome ifs.