Liste des Groupes | Revenir à cl c |
On 2025-03-04, bart <bc@freeuk.com> wrote:I like the brace on its own line. It visually separates the condidition from the statement.The style I use for generated code is like this:I've been known to do this:
>
if (cond) {
stmt1;
}
else {
stmt2;
}
if (case_ineligible_for_switch) {
// ...
} else switch (state_variable) {
// ...
}
or
if (case_not_requiring_loop) {
// ...
} else for (;;) {
// ...
}
and I might even have historically perpetrated something like:
if (case_not_requiring_loop) {
// ...
} else if (case_requiring_loop) for (;;) {
// ...
} else {
// ...
}
:)
Les messages affichés proviennent d'usenet.