Thanks for the information on "continue" and I stand corrected on "break". Sean On Wed, Aug 26, 2009 at 12:51 PM, Byron Jeff wrote: > On Tue, Aug 25, 2009 at 11:55:32AM -0400, Sean Breheny wrote: >> What is a "continue" statement? I assumed we were talking about C >> here, I've never seen a C keyword "continue" > > Answered elsewhere. > >> >> Also, I think that break DOES work inside the {} following an IF >> statement. It immediately takes you out of the {}. > > Nope. 2 second test > > Code: > > #include > > main() > { > =A0 int a =3D 1; > > =A0 if (a =3D=3D 1) { > =A0 =A0 =A0printf("Before break\n"); > =A0 =A0 =A0break; > =A0 =A0 =A0printf("After break\n"); > =A0 } > =A0 else { > =A0 =A0 =A0printf("before break in else\n"); > =A0 =A0 =A0break; > =A0 =A0 =A0printf("before break in else\n"); > =A0 } > } > > Produced. > > cc =A0 =A0 testme.c =A0 -o testme > testme.c: In function 'main': > testme.c:9: error: break statement not within a loop or switch > testme.c:14: error: break statement not within a loop or switch > make: *** [testme] Error 1 > > Continues and breaks only work within certain constructs. > > BAJ >> >> Sean >> >> >> On Mon, Aug 24, 2009 at 6:11 PM, Marcel >> Birthelmer wrote: >> >> >> >> #define while if >> >> >> > >> > This would choke on break/continue statements, though. >> > -- >> > http://www.piclist.com PIC/SX FAQ & list archive >> > View/change your membership options at >> > http://mailman.mit.edu/mailman/listinfo/piclist >> > >> -- >> http://www.piclist.com PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist