OC Goto Syntax

Source: Internet
Author: User

// This sentence can not write, write a warning, if the following statement error, write this sentence

struct label *Jumpto;

for (int i=0; i< ; i++) {

NSLog(@ "0000====%d", i);

if (i==5) {

gotojumpto;

}

NSLog(@ "1111====%d", i);

jumpto:NSLog(@ " jump to this line ");

}

Run results

2014-12-17 17:46:43.465 mustdemo[1335:613765] 0000====0

2014-12-17 17:46:43.466 mustdemo[1335:613765] 1111====0

2014-12-17 17:46:43.466 mustdemo[1335:613765] jump to this line

2014-12-17 17:46:43.466 mustdemo[1335:613765] 0000====1

2014-12-17 17:46:43.466 mustdemo[1335:613765] 1111====1

2014-12-17 17:46:43.466 mustdemo[1335:613765] jump to this line

2014-12-17 17:46:43.466 mustdemo[1335:613765] 0000====2

2014-12-17 17:46:43.466 mustdemo[1335:613765] 1111====2

2014-12-17 17:46:43.466 mustdemo[1335:613765] jump to this line

2014-12-17 17:46:43.467 mustdemo[1335:613765] 0000====3

2014-12-17 17:46:43.467 mustdemo[1335:613765] 1111====3

2014-12-17 17:46:43.467 mustdemo[1335:613765] jump to this line

2014-12-17 17:46:43.467 mustdemo[1335:613765] 0000====4

2014-12-17 17:46:43.467 mustdemo[1335:613765] 1111====4

2014-12-17 17:46:43.467 mustdemo[1335:613765] jump to this line

2014-12-17 17:46:43.468 mustdemo[1335:613765] 0000====5

2014-12-17 17:46:43.469 mustdemo[1335:613765] jump to this line

2014-12-17 17:46:43.469 mustdemo[1335:613765] 0000====6

2014-12-17 17:46:43.469 mustdemo[1335:613765] 1111====6

2014-12-17 17:46:43.470 mustdemo[1335:613765] jump to this line

2014-12-17 17:46:43.471 mustdemo[1335:613765] 0000====7

2014-12-17 17:46:43.472 mustdemo[1335:613765] 1111====7

2014-12-17 17:46:43.472 mustdemo[1335:613765] jump to this line

2014-12-17 17:46:43.472 mustdemo[1335:613765] 0000====8

2014-12-17 17:46:43.472 mustdemo[1335:613765] 1111====8

2014-12-17 17:46:43.472 mustdemo[1335:613765] jump to this line

2014-12-17 17:46:43.472 mustdemo[1335:613765] 0000====9

2014-12-17 17:46:43.473 mustdemo[1335:613765] 1111====9

2014-12-17 17:46:43.473 mustdemo[1335:613765] jump to this line


OC Goto Syntax

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.