[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



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>