• 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: Compiler Sometimes Not Handling Escape Sequences in C-Strings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler Sometimes Not Handling Escape Sequences in C-Strings?


  • Subject: Re: Compiler Sometimes Not Handling Escape Sequences in C-Strings?
  • From: Cameron Hayne <email@hidden>
  • Date: Mon, 28 Aug 2006 03:09:03 -0400

On 27-Aug-06, at 9:53 PM, Larry Bright wrote:

All the escaped newline characters appear as two characters in the file - backslash followed by lower-case letter n. I have searched the online documentation, re-read my most basic C books to confirm that I'm not crazy and I still have no idea why the "escaping" of the newline does not work.

Look at the compiled executable with 'hexdump -C' and see if the "\n" characters appear in the executable as 0xa
They should.
For example:
% cat hello_world.c
#include <stdio.h>


int main()
{
    printf("Hello World\n");
    return 0;
}

% hexdump -C hello_world | grep Hello
00001e20 48 65 6c 6c 6f 20 57 6f 72 6c 64 0a 00 00 00 00 |Hello World.....|


--
Cameron Hayne
email@hidden


_______________________________________________ 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: Compiler Sometimes Not Handling Escape Sequences in C-Strings?
      • From: Larry Bright <email@hidden>
References: 
 >Compiler Sometimes Not Handling Escape Sequences in C-Strings? (From: Larry Bright <email@hidden>)

  • Prev by Date: Compiler Sometimes Not Handling Escape Sequences in C-Strings?
  • Next by Date: Help get started with the Accelerate Framework
  • Previous by thread: Compiler Sometimes Not Handling Escape Sequences in C-Strings?
  • Next by thread: Re: Compiler Sometimes Not Handling Escape Sequences in C-Strings?
  • Index(es):
    • Date
    • Thread