• 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: Soft return in XCode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Soft return in XCode


  • Subject: Re: Soft return in XCode
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 26 May 2010 14:45:25 -0700

On May 26, 2010, at 2:39 PM, Lorenzo Thurman wrote:

> In the past, one could simply hit option-enter, but the IDE in XCode doesn't respect that. How does one go about that? I have a really long string literal that I'd like break into smaller chunks.

The C language requires that you put a “\” at the end of each line if a string literal spans multiple lines:
	const char *foo = “this is a long \
string literal”;

Or a better way is to take advantage of the fact that the parser combines multiple adjacent string literals into one; this way you don’t have to worry about the indentation characters ending up in the string:
	const char *foo = “this is a log ”
				“string literal”;

I’m not sure what option-Enter has to do with this; did I misunderstand the question?

—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Soft return in XCode
      • From: Alastair Houghton <email@hidden>
    • Re: Soft return in XCode
      • From: Lorenzo Thurman <email@hidden>
References: 
 >Soft return in XCode (From: Lorenzo Thurman <email@hidden>)

  • Prev by Date: Re: Global variables - I'm stumped
  • Next by Date: Re: Soft return in XCode
  • Previous by thread: Soft return in XCode
  • Next by thread: Re: Soft return in XCode
  • Index(es):
    • Date
    • Thread