⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 preface.html

📁 this is a mirrored site c-faq. thought might need offline
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN"><html><!-- Mirrored from c-faq.com/book/preface.html by HTTrack Website Copier/3.x [XR&CO'2008], Sat, 14 Mar 2009 07:59:10 GMT --><head><meta name=GENERATOR content="faqproc"><title>C Programming FAQs: Preface</title></head><body bgcolor="#ffffff"><p>[This is the Preface from the book-length version of the C FAQ list:<I>C Programming FAQs: Frequently Asked Questions</I>,Addison-Wesley, 1995, ISBN 0-201-84519-9.]<H1>Preface</H1><p>At some point in 1979,I hearda lot ofpeople talking about this relatively new language,C,and the book which had just come out about it.I bought a copy of K&amp;R,otherwise known as <I>The C Programming Language</I>,by Brian Kernighan and Dennis Ritchie,but it sat on my shelf for a while because I didn't have an immediate need for it(besides which I was busy being a college freshman at the time).It proved in the end to be an auspicious purchase,though,because when I finally did take it up,I never put it down:I've been programming in C ever since.</p><p>In 1983,I came acrossthe Usenet newsgroup net.lang.c,which was(and its successor <a href="news:comp.lang.c">comp.lang.c</a> still is)an excellentplace to learna lot more about C,andto find outwhat questions everyone else is having about C,andto discoverthat you may not know all there is to know about C after all.It seems that C,despite its apparent simplicity,has a number of decidedly non-obvious aspects,and certain questions come up over and over again.This book is a collection ofsome ofthose questions,with answers,based on the Frequently-Asked Questions(``FAQ'') listwhich I began posting to comp.lang.c in May, 1990.</p><p>I hasten to add,however,that this book is notintended asa critique or ``hatchet job'' on the C language.It isall tooeasy to blame a language(or any tool)for the difficulties its users encounter with it,or to claim that a properly-designed tool``ought'' to prevent its users from misusing it.It would therefore be easy toregarda book like this,with its long lists of misuses,as a litany of woesattempting to show that the language is hopelessly deficient.Nothing could be farther from the case.</p><p>I would never have learned enough about Cto be able to write this book,and I would notbe attemptingto make C more pleasant for others to useby writing this booknow,if I did notthink that C was a great languageorif I did not enjoy programming in it.I <em>do</em> like C,and one of the reasons that I teach classes in itandspend time participating in discussion about it on the Internetis that I would like todiscoverwhich aspects of C(or of programming in general)are difficult to learnor keep people from being able to program efficiently and effectively.This book represents some of what I've learned:thesequestions are certainly some of the onespeople have the most trouble with,and the answers have been refined over a several-year periodin an attempt to ensurethat people don't have too much trouble with <em>them</em>.</p><p>A reader will certainly have trouble if there are any errors in these answers,and although the reviewersand I have worked hard to eliminate them,it can be as hard to eradicate the last error from a large manuscript as it is to stamp out the last bug in a program.I will appreciate any corrections or suggestions sent to mein care of the publisheror at the e-mail address below,and I would like to offer the customary $1.00 rewardto the first finder of any error.If you have access to the Internet,you can check for an errata list(and a scorecard of the finders)at the ftp and http addressesmentioned in <a href="../misc/faqavail.html">question 20.40</a>.</p><p>As I hope I've made clear,this book is not a critique of the C Programming language,nor is ita critique of the book from which I first learned C,nor ofthat book's authors.I didn't just learn C from K&amp;R;I also learned a lot about programming.As I contemplate my own contribution to the C programmingliterature,my only regret is thatthe present bookdoes not live up toa nice observationmadeinthe second edition of K&amp;R,namely that``C is not a big language,and it is not well served by a big book.''I hope that those who most deeply appreciate C'sbrevity and precision(and that of K&amp;R)will not be too offendedby the fact that this book says some things over and over and over,or in three slightly different ways.</p><p>Though my name is on the cover,there are a lot of people behind this book,and it's hard to know where to start handing out acknowledgments.In a sense,every one of comp.lang.c's readers(today estimated at320,000)isa contributor:the FAQ list behind this book was written for comp.lang.c first,and this book retainsthe flavor of a good comp.lang.c discussion.</p><p>This book also retains,I hope,the philosophy of correct C programmingwhich I began learningwhen I started reading net.lang.c.Therefore,Ishallfirst acknowledge theposterswho stand out in my mind ashaving most clearly and consistentlyarticulatedthat philosophy:Doug Gwyn,Guy Harris,Karl Heuer,Henry Spencer,andChris Torek.These gentlemen have displayedremarkablepatience over the years,answeringendless questionswith generosity and wisdom.I wasthe one who stuck his neck out and started writing the Frequent questions down,butI would hate to give the impression that the answers are somehow mine.I was once the student(I believe it wasGuy whoanswered my postasking essentiallythe present volume's<a href="../null/macsochange.html">question 5.10</a>),and Iowe a real debtto the masters who went before me.This book is theirs as much as mine,though I retain title to any inadequacies or mistakesI've made in the presentation.</p><p>The former on-line FAQ listgrew by a factor ofthreein the process of becoming this book,and its growth was a bitrapid and awkward at times.Mark Brader,Vinit Carpenter,Stephen Clamage,Jutta Degener,Doug Gwyn,Karl Heuer,Joseph Kent,andGeorge Leachreadproposals orcomplete drafts and helped toexert some controlover the process;I thank them for theirmany careful suggestions and corrections.Their efforts grewout of a shared wish to improve the overall understandingof C in the programming community.I appreciate their dedication.</p><p>Three of those reviewers have also beenlong-time contributors to the on-line FAQ list.I thank Jutta Degenerand Karl Heuer for their help over the years,and I especially thank Mark Brader,whohas been my most persistent critic ever since I first began posting the comp.lang.c FAQ listfive years ago.I don't know how he hashadthe stamina tomake as many suggestions and corrections as he has,and to overcome mycontinuing stubborn refusalto agree with some of them,even though(as I eventually understood)theyreally <em>were</em> improvements.You can thank Markforthe form ofmany of this book's explanations,and blame me for mangling any of them.</p><p>Additionalassortedthanks:to Susan Cyr for the cover art;toBob Dinse and Eskimo Northfor providing the network access which is particularly vital to a project like this;to Bob Holland for providing the computer on which I've done most of the writing;to Pete Keleher for the Alpha text editor;to the University of WashingtonMathematics Research and Engineering librariesfor access to their collections;andto the University of Washington Oceanography departmentfor letting me borrow their tape drivesto access my dusty old archives of Usenet postings.</p><p>Thanksto Tanmoy Bhattacharyafor the example in <a href="../ansi/constmismatch.html">question 11.10</a>,to Arjan Kenterfor the code in <a href="../lib/regex.html">question 13.7</a>,to Tomohiko Sakamotofor the code in <a href="../misc/zeller.html">question 20.31</a>,and to Roger Millerfor the line in <a href="../ansi/experiment.html">question 11.35</a>.</p><p>Finally,I'd like tothank my editor at Addison-Wesley,Debbie Lafferty,for tapping me on the electronic shoulder one dayand asking if I might be interested in writing this book.I was,and you now hold it,and I hopethat itmayhelp to make C programming aspleasantfor you as it is for me.</p><p>Steve Summit<br><a href="mailto:scs@eskimo.com">scs@eskimo.com</a><br><br>Seattle, Washington<br>July, 1995</p></body><!-- Mirrored from c-faq.com/book/preface.html by HTTrack Website Copier/3.x [XR&CO'2008], Sat, 14 Mar 2009 07:59:10 GMT --></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -