« Return to Thread: using BREAK in 'C'

Re: using BREAK in 'C'

by Alan B. Pearce-2 :: Rate this Message:

Reply to Author | View in Thread

>I can see what you're getting at here.  But this has raised a
>minor question though; I was unaware that such a 'goto case N'
>statement existed in C (at least in ANSI C).

case n: is just a label, that is why it has the colon after it (just like
any other label in C). That is also why the break leaps out of the switch
statement, just like it jumps out of a while or for statement.

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

 « Return to Thread: using BREAK in 'C'