📄 index.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN"><!-- This collection of hypertext pages is Copyright 1995-2005 by Steve Summit. --><!-- Content from the book "C Programming FAQs: Frequently Asked Questions" --><!-- (Addison-Wesley, 1995, ISBN 0-201-84519-9) is made available here by --><!-- permission of the author and the publisher as a service to the community. --><!-- It is intended to complement the use of the published text --><!-- and is protected by international copyright laws. --><!-- The on-line content may be accessed freely for personal use --><!-- but may not be published or retransmitted without explicit permission. --><!-- --><!-- this page built Sat Dec 24 21:47:46 2005 by faqproc version 2.7 --><!-- from source file style.sgml dated Sat Jul 3 17:22:13 2004 --><!-- corresponding to FAQ list version 4.0 --><html><!-- Mirrored from c-faq.com/style/index.html by HTTrack Website Copier/3.x [XR&CO'2008], Sat, 14 Mar 2009 07:56:25 GMT --><head><meta name=GENERATOR content="faqproc"><title>Style</title></head><body bgcolor="#ffffff"> <a href="../index-2.html"><img src="../images/buttontop.gif" alt="top/contents"></a><a href="../search.html"><img src="../images/buttonsrch.gif" alt="search"></a><hr><H1>17. Style</H1><p><a href="layout.html" rel=subdocument>17.1</a>What's the best style for code layout in C?</p><p><a href="srcfiles.html" rel=subdocument>17.2</a>How should functions be apportioned among source files?</p><p><a href="strcmp.html" rel=subdocument>17.3</a>Here's a neat trick for checking whether two strings are equal:<pre>if(!strcmp(s1, s2))</pre>Is thisgood style?</p><p><a href="revtest.html" rel=subdocument>17.4</a>Why do some people write<TT>if(0 == x)</TT>instead of<TT>if(x == 0)</TT>?</p><p><a href="protomacro.html" rel=subdocument>17.4b</a>I've seen function declarations that look like this:<pre>extern int func __((int, int));</pre>What are thoseextra parentheses and underscoresfor?</p><p><a href="voidcasts.html" rel=subdocument>17.5</a>I came across some code thatputsa <TT>(void)</TT> cast beforeeachcall to <TT>printf</TT>.Why?</p><p><a href="nullor0.html" rel=subdocument>17.6</a>If <TT>NULL</TT> and <TT>0</TT> are equivalentas null pointer constants,which should I use?</p><p><a href="bool.html" rel=subdocument>17.7</a>Should I use symbolic names like <TT>TRUE</TT>and <TT>FALSE</TT> for Boolean constants,or plain 1 and 0?</p><p><a href="hungarian.html" rel=subdocument>17.8</a>What is ``Hungarian Notation''?Is it worthwhile?</p><p><a href="guides.html" rel=subdocument>17.9</a>Where can I get the``Indian Hill Style Guide''and othercoding standards?</p><p><a href="stylewars.html" rel=subdocument>17.10</a>Some people say that <TT>goto</TT>'s are eviland that I should never use them.Isn't that a bit extreme?</p><p><a href="vsefficiency.html" rel=subdocument>17.11</a>People always say that good style is important,but when they go out of their wayto use clear techniquesand make their programs readable,they seem to end up with less efficient programs.Since efficiency is so important,isn't itnecessaryto sacrifice some style andreadability?</p><p><a href="charstarws2.html" rel=subdocument>17.12</a>Which is correct,<pre>char *p</pre>or<pre>char* p</pre>?</p><hr><p><a href="../index-2.html">top</a></p><p><a href="../questions.html"><img src="../images/buttontop.gif" alt="contents"></a><a href="../search.html"><img src="../images/buttonsrch.gif" alt="search"></a><br><a href="../about.html">about this FAQ list</a> <a href="../eskimo.html">about eskimo</a> <a href="../search.html">search</a> <a href="../feedback.html">feedback</a> <a href="copyright.html">copyright</a><p>Hosted by<a href="http://www.eskimo.com/"><img src="../../www.eskimo.com/img/link/eskitiny.gif" alt="Eskimo North"></a></p></body><!-- Mirrored from c-faq.com/style/index.html by HTTrack Website Copier/3.x [XR&CO'2008], Sat, 14 Mar 2009 07:56:30 GMT --></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -