[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Thu Jul 22 14:31:13 2004 -->
- <!--x-from-r13: nyr ng ThygbaUerra.pbz (Thygba Uerra) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] Quick gcc question -->
- <li><em>date</em>: Thu Jul 22 14:31:13 2004</li>
- <li><em>from</em>: ale at FultonGreen.com (Fulton Green)</li>
- <li><em>in-reply-to</em>: <<a href="msg00604.html">[email protected]</a>>; from [email protected] on Thu, Jul 22, 2004 at 02:06:32PM -0400</li>
- <li><em>references</em>: <<a href="msg00604.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] Quick gcc question</li>
A better way to do it, if you have the option of changing the code, is to
write the strings like this:
printf ("Copy a file.\n"
"Then use it.\n");
That's the ANSI-standard way of doing things, which is roughly how GCC
compiles by default (the -ansi and -pedantic switches ensure near-100%
checking for ANSI compliance). Note that the whitespace before the
second line has no bearing on the string literal that GCC creates
internally.
The older way, which is what your code is showing, is indicative of the
Kernighan & Ritchie (or "K&R") syntax used in the initial releases of C,
before the C standards committees came on the scene. If changing the
code isn't an option, use the -traditional switch.
HTH
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00611" href="msg00611.html">[ale] Quick gcc question</a></strong>
<ul><li><em>From:</em> freemyer-ml at NorcrossGroup.com (Greg Freemyer)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00604" href="msg00604.html">[ale] Quick gcc question</a></strong>
<ul><li><em>From:</em> freemyer-ml at NorcrossGroup.com (Greg Freemyer)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00607.html">[ale] /dev/ttyUSB0 question</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00609.html">[ale] Updating a RH9 server...</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00604.html">[ale] Quick gcc question</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00611.html">[ale] Quick gcc question</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00608"><strong>Date</strong></a></li>
<li><a href="threads.html#00608"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>