Author Topic: C Lessons  (Read 10482 times)

0 Members and 1 Guest are viewing this topic.

JRS

  • Guest
Re: C Lessons
« Reply #15 on: August 23, 2012, 03:01:30 PM »
It compiled. (with warnings) What are all the backslash escape characters for?

jrs@laptop:~/O2C$ gcc parse.c -o parse
parse.c: In function ‘main’:
parse.c:174:18: warning: backslash and newline separated by space [enabled by default]
parse.c:175:32: warning: backslash and newline separated by space [enabled by default]
jrs@laptop:~/O2C$ ./parse
Hello Brave New World ! ! \
7
92
0jrs@laptop:~/O2C$

Charles Pegge

  • Guest
Re: C Lessons
« Reply #16 on: August 23, 2012, 04:48:15 PM »
These were for testing backslash-Escape and bacslash signifying line continuation.

What has happened is that a space character has crept in to the right of the final backslash .

The SMF C-code formatter is not good at maintaining the integrity of the code. It also corrupts array expressions like s[i]

Charles

JRS

  • Guest
Re: C Lessons
« Reply #17 on: August 23, 2012, 05:23:14 PM »
Maybe it would be best to always attach code in a zip as well.


Charles Pegge

  • Guest
Re: C Lessons
« Reply #18 on: August 23, 2012, 05:34:45 PM »
Yes certainly, my test pieces are likely to get longer anyway, so I will display key code only and zip the full code.

Charles