In message <49df660f.1060...@ytivarg.com> you wrote: > Barton C Massey wrote: > > It's a less-than-good feature of C. Case labels are labels, > > and thus must label a statement. > > For what it's worth, in object-oriented land (I mainly do Java these > days) case statements are also (supposed to be) atomic operations. Same > idea, slightly different syntax.
I'm not sure what you mean here. In Java declarations are statements, as they should be[*], and so you can put them right after a case label and everything works great. (Duff's Device is also illegal in Java, which is a bit sad. Case labels must occur only immediately inside a switch.) Bart [*] Actually, declarations should be expressions, as they are in Nickle (http://nickle.org). This allows some convenient and clear notation, such as scanf("%d %d", &(int x), &(int y)); printf("%d %d\n", x, y); _______________________________________________ psas-avionics mailing list psas-avionics@lists.psas.pdx.edu http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics