• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: break, continue, goto
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: break, continue, goto (From: "Clark S. Cox III" <email@hidden>)

  • Prev by Date: Re: Which alternate row color spec is correct?
  • Next by Date: Re: am i loading this pdf data correctly or not?
  • Previous by thread: Re: break, continue, goto
  • Next by thread: Re: break, continue, goto
  • Index(es):
    • Date
    • Thread