Re: break, continue, goto
Re: break, continue, goto
- Subject: Re: break, continue, goto
- From: "Alastair J.Houghton" <email@hidden>
- Date: Wed, 6 Aug 2003 14:51:26 +0100
On Wednesday, August 6, 2003, at 02:23 pm, Clark S.Cox III wrote:
On Wednesday, August 06, 2003, at 08:02, Alastair J.Houghton wrote:
By contrast, in C, you can only jump within the current function, and
you aren't allowed to jump into a block (although you can jump out of
one)
I think you're mistaken. Try the following code:
[about jumping into a block]
You're quite right. I stand corrected. There are some circumstances
under which you aren't allowed though, for example if you have declared
a variable length array - e.g.
goto label;
{
int array[n];
label:
;
}
is illegal. Also, I can't see where in the standard it says what
happens if you jump into a block that contains initialisers...
goto label;
{
int a = 3;
label:
/* Is a 3 here? */
}
Anyway, you still can't jump outside the current function, which was
the main thrust of what I wanted to say.
Kind regards,
Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.