The C Programming Language前言试译

Preface(前言)
The computing world has undergone a revolution since the publication of the C Programming Language in 1978.(自从1978年《C程序设计语言》发行以来计算世界已经经历了一场革命。)Big computers are much bigger,and personal computers have capabilities that rival mainframes of a decade ago.(大计算机赿来越大,并且个人计算机具有比得上十年前的大型机的能力。)During this time,C has changed too, although only modestly,and it has spread far beyond its origins as the language of the UNIX operating system.(在此期间,C语言已经发生了改变,尽管仅仅很小程度,且它已经超过它作为UNUX操作系统语言的起源得到了广泛传播。)
The growing popularity of C,the changes in the language over the years,and the creation of compilers by groups not involved in its design,combined to demonstrate a need for a more precise and more contemporary definition of the language than the first edition of this book provided.(语言的日益流行,这门语言多年来的变化,以及没有参与其设计的团体创建的编译器,结合起来表明需要比本书第一版提供的更精确和更现代的语言定义。)In 1983,the American National Standards Institute(ANSI) established a commitee whose goal was to produce “an unambiguous and machine-independent definition of the language C,”while still retaining its spirit.The result is the ANSI standard for C.(1983年,美国国家标准学会建立了一个目标为产生“不含糊的、不依赖机器的C语言定义”的委员会,同时还保留它的精神。结果是C语言的ANSI标准。)
The standard formalizes constructions that were hinted at but not described in the first edition,particularly structure assignment and enumerations.(标准使在第一版中暗示但没有描述的语法结构形式化,尤其是构造分配和列举。)It provides a new form of function declaration that permits cross-checking of definition with use.(它提供了一种允许反复核对使用的定义的函数宣言的新形式。)It specifies a standard library,with an extensive set of functions for performing input and output,memory management,string manipulation,and similar tasks.(它指定一个有大量的执行输入和输出的函数组、内存管理、线程控制、及类似任务的标准库。)It makes precise the behavior of features that were not spelled out in the original definition,and at the same time states explicitly which aspects of the language remain machine-dependent. (它使没有在原先定义中详细说明的特征行为精确,同时清楚明确地说明语言的哪些方面保持机器依赖。)
This second edition of The C Programming Language describes C as defined by the ANSI standard.(C编程语言的这个第二版描述按ANSI标准定义的C。)Although we have noted the places where the language has evolved,we have chosen to write exclusively in the new form.(尽管我们已经注意到了语言已经进化的地方,我们专门地选择以新的形式写。)For the most part,this makes no significant difference; the most visible change is the new form of function declaration and definition.(对于绝大部分,这没有明显区别;最明显的变化是函数申明的新的形式和定义。)Modern compilers already support most features of the standard.(现代的编译程序已经支持标准的大部分特点。)
We have tried to retain the brevity of the first edition.(我们试图保持第一版的简洁。)C is not a big language,and it is not well served by a big book.(C语言不一个大的语言,并且不能通过 一本大的书来很好地提供。)We have improved the exposition of critical features(我们已经改善了关键特点的阐述),such as pointers,that are central to C programming.(比如对C语言编程起关键作用的指针。)We have refined the original examples,and have added new examples in several chapters.(我们改善了原先的例子,并且在几章中增加了新的例子。)For instance,the treatment of complicated declarations is augmented by programs that convert declarations into words and vice versa.(例如,由转换声明为字词和转换字词为申明的程序提供的复杂申明的处理增广了。)As before,all example have been tested directly from the text,which is in machine-readable form.(如以前一样,所有的例子已经直接从机器可读形式的文本测试过。)
Appendix A,the reference manual,is not the standard,but our attempt to convey the essentials of the standard in a small space.(附录A,参考手册,不是标准,但我们努力在一个小的空间传递标准的必不可少的东西。)It meant for easy comprehension by programmers,but not as a definition for compiler writers—— that role properly belongs to the standard itself.(它为了程序员易于理解面设计,但不作为编译程序作者(属于标准自己的合适角色)的一个定义)。Appendix B is a summary of the facilities of the standard library.(附录B是一个标准库设备的概述。)It too is meant for reference by programmers,not implementers.(它也是为程序员参考设计,不是实现器。)Appendix C is a concise summary of the changes from the original version.(附录C是一个从原版的变化的概述。)
As we said in the preface to the first edition,C “wears well as one`s experience with it grows.”with a decade more experience,we still feel that way.(我们在第一版前言中说过,C“随着它成长历久弥新”,经过十多年的经历,我们仍有这样的感觉。)We hope that this book will help you to learn C and use it well.(我希望这本书有助于你学习C语言并用好它。)
We are deeply indebted to friends who helped us to produce this second edition.(我们深深地感激帮助我们制作这第二版的朋友们。)Jon Bentley(乔恩 宾利),Doug Gwyn(道格 格温),Doug McIlroy(道格 麦基尔罗伊),Peter Nelson(彼得 尼尔森),and Rob Pike(以及罗勃 派克)gave us perceptive comments on almost every page of draft manuscripts.(在几乎每一页手拟的原稿给予了我们具有洞察力的评论。)We are grateful for careful reading by Al Aho,Dennis Allison,Joe Campbell,G.R.Emlin,Karen Fortgang,Allen Holub,Andrew Hume,Dave Kristol,John Linderman,Dave Prosser,Gene Spafford,and Chris Van Wyk.(我们对艾尔·阿霍、丹尼斯·艾立逊、乔·坎贝尔、G.R.艾姆林、卡伦·神福特甘、阿伦·赫鲁伯,安德鲁·休姆、戴夫·克里斯托尔、约翰·林德曼、戴夫·普罗塞、基恩·斯帕福德、克里斯·冯·Wyk的仔细阅读感激不尽。)We also received helpful suggestions from Bill Cheswick,Mark Kernighan,Andy Koenig,Robin Lake,Tom London,Jim Reeds,Clovis Tondo,and Peter Weinberger.(我们也接受了来自比尔·克斯威克、马克·克尼汉、安迪·凯尼格、罗宾·莱克、汤姆·伦敦、吉姆·里兹、克罗维斯·通多和彼得·温伯格的有益的建议。)Dave Prosser answered many detailed queations about the ANSI standard.(戴夫·普罗塞回答了许多有关ANSI标准的放多细节问题。)we used Bjarne Stroustrup’s C++ translator extensively for local testing of our programs,and Dave Kristol provided us with an ANSI C compiler for final testing.(我们用本贾尼·斯特劳斯特卢普的C++ 翻译程序广泛对我们的程序进行了局部测试,且戴夫·克里斯托尔为我们最终测试提供了一个ANSI 编译程序。)Rich Drechsler helped greatly with typesetting.(里克·德雷克斯勒对排版帮助极大。)
Our sincere thanks to all.(衷心感谢大家。)

Brian W.Kernighan(布莱恩 W.克尼汉)
Dennis M. Ritchie(丹尼斯·M.里奇)Preface(前言)
The computing world has undergone a revolution since the publication of the C Programming Language in 1978.(自从1978年《C程序设计语言》发行以来计算世界已经经历了一场革命。)Big computers are much bigger,and personal computers have capabilities that rival mainframes of a decade ago.(大计算机赿来越大,并且个人计算机具有比得上十年前的大型机的能力。)During this time,C has changed too, although only modestly,and it has spread far beyond its origins as the language of the UNIX operating system.(在此期间,C语言已经发生了改变,尽管仅仅很小程度,且它已经超过它作为UNUX操作系统语言的起源得到了广泛传播。)
The growing popularity of C,the changes in the language over the years,and the creation of compilers by groups not involved in its design,combined to demonstrate a need for a more precise and more contemporary definition of the language than the first edition of this book provided.(语言的日益流行,这门语言多年来的变化,以及没有参与其设计的团体创建的编译器,结合起来表明需要比本书第一版提供的更精确和更现代的语言定义。)In 1983,the American National Standards Institute(ANSI) established a commitee whose goal was to produce “an unambiguous and machine-independent definition of the language C,”while still retaining its spirit.The result is the ANSI standard for C.(1983年,美国国家标准学会建立了一个目标为产生“不含糊的、不依赖机器的C语言定义”的委员会,同时还保留它的精神。结果是C语言的ANSI标准。)
The standard formalizes constructions that were hinted at but not described in the first edition,particularly structure assignment and enumerations.(标准使在第一版中暗示但没有描述的语法结构形式化,尤其是构造分配和列举。)It provides a new form of function declaration that permits cross-checking of definition with use.(它提供了一种允许反复核对使用的定义的函数宣言的新形式。)It specifies a standard library,with an extensive set of functions for performing input and output,memory management,string manipulation,and similar tasks.(它指定一个有大量的执行输入和输出的函数组、内存管理、线程控制、及类似任务的标准库。)It makes precise the behavior of features that were not spelled out in the original definition,and at the same time states explicitly which aspects of the language remain machine-dependent. (它使没有在原先定义中详细说明的特征行为精确,同时清楚明确地说明语言的哪些方面保持机器依赖。)
This second edition of The C Programming Language describes C as defined by the ANSI standard.(C编程语言的这个第二版描述按ANSI标准定义的C。)Although we have noted the places where the language has evolved,we have chosen to write exclusively in the new form.(尽管我们已经注意到了语言已经进化的地方,我们专门地选择以新的形式写。)For the most part,this makes no significant difference; the most visible change is the new form of function declaration and definition.(对于绝大部分,这没有明显区别;最明显的变化是函数申明的新的形式和定义。)Modern compilers already support most features of the standard.(现代的编译程序已经支持标准的大部分特点。)
We have tried to retain the brevity of the first edition.(我们试图保持第一版的简洁。)C is not a big language,and it is not well served by a big book.(C语言不一个大的语言,并且不能通过 一本大的书来很好地提供。)We have improved the exposition of critical features(我们已经改善了关键特点的阐述),such as pointers,that are central to C programming.(比如对C语言编程起关键作用的指针。)We have refined the original examples,and have added new examples in several chapters.(我们改善了原先的例子,并且在几章中增加了新的例子。)For instance,the treatment of complicated declarations is augmented by programs that convert declarations into words and vice versa.(例如,由转换声明为字词和转换字词为申明的程序提供的复杂申明的处理增广了。)As before,all example have been tested directly from the text,which is in machine-readable form.(如以前一样,所有的例子已经直接从机器可读形式的文本测试过。)
Appendix A,the reference manual,is not the standard,but our attempt to convey the essentials of the standard in a small space.(附录A,参考手册,不是标准,但我们努力在一个小的空间传递标准的必不可少的东西。)It meant for easy comprehension by programmers,but not as a definition for compiler writers—— that role properly belongs to the standard itself.(它为了程序员易于理解面设计,但不作为编译程序作者(属于标准自己的合适角色)的一个定义)。Appendix B is a summary of the facilities of the standard library.(附录B是一个标准库设备的概述。)It too is meant for reference by programmers,not implementers.(它也是为程序员参考设计,不是实现器。)Appendix C is a concise summary of the changes from the original version.(附录C是一个从原版的变化的概述。)
As we said in the preface to the first edition,C “wears well as one`s experience with it grows.”with a decade more experience,we still feel that way.(我们在第一版前言中说过,C“随着它成长历久弥新”,经过十多年的经历,我们仍有这样的感觉。)We hope that this book will help you to learn C and use it well.(我希望这本书有助于你学习C语言并用好它。)
We are deeply indebted to friends who helped us to produce this second edition.(我们深深地感激帮助我们制作这第二版的朋友们。)Jon Bentley(乔恩 宾利),Doug Gwyn(道格 格温),Doug McIlroy(道格 麦基尔罗伊),Peter Nelson(彼得 尼尔森),and Rob Pike(以及罗勃 派克)gave us perceptive comments on almost every page of draft manuscripts.(在几乎每一页手拟的原稿给予了我们具有洞察力的评论。)We are grateful for careful reading by Al Aho,Dennis Allison,Joe Campbell,G.R.Emlin,Karen Fortgang,Allen Holub,Andrew Hume,Dave Kristol,John Linderman,Dave Prosser,Gene Spafford,and Chris Van Wyk.(我们对艾尔·阿霍、丹尼斯·艾立逊、乔·坎贝尔、G.R.艾姆林、卡伦·神福特甘、阿伦·赫鲁伯,安德鲁·休姆、戴夫·克里斯托尔、约翰·林德曼、戴夫·普罗塞、基恩·斯帕福德、克里斯·冯·Wyk的仔细阅读感激不尽。)We also received helpful suggestions from Bill Cheswick,Mark Kernighan,Andy Koenig,Robin Lake,Tom London,Jim Reeds,Clovis Tondo,and Peter Weinberger.(我们也接受了来自比尔·克斯威克、马克·克尼汉、安迪·凯尼格、罗宾·莱克、汤姆·伦敦、吉姆·里兹、克罗维斯·通多和彼得·温伯格的有益的建议。)Dave Prosser answered many detailed queations about the ANSI standard.(戴夫·普罗塞回答了许多有关ANSI标准的放多细节问题。)we used Bjarne Stroustrup’s C++ translator extensively for local testing of our programs,and Dave Kristol provided us with an ANSI C compiler for final testing.(我们用本贾尼·斯特劳斯特卢普的C++ 翻译程序广泛对我们的程序进行了局部测试,且戴夫·克里斯托尔为我们最终测试提供了一个ANSI 编译程序。)Rich Drechsler helped greatly with typesetting.(里克·德雷克斯勒对排版帮助极大。)
Our sincere thanks to all.(衷心感谢大家。)

Brian W.Kernighan(布莱恩 W.克尼汉)
Dennis M. Ritchie(丹尼斯·M.里奇)Dennis M. Ritchie(丹尼斯·M.里奇)@TOC

欢迎使用Markdown编辑器

你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Markdown编辑器, 可以仔细阅读这篇文章,了解一下Markdown的基本语法知识。

新的改变

我们对Markdown编辑器进行了一些功能拓展与语法支持,除了标准的Markdown编辑器功能,我们增加了如下几点新功能,帮助你用它写博客:

  1. 全新的界面设计 ,将会带来全新的写作体验;
  2. 在创作中心设置你喜爱的代码高亮样式,Markdown 将代码片显示选择的高亮样式 进行展示;
  3. 增加了 图片拖拽 功能,你可以将本地的图片直接拖拽到编辑区域直接展示;
  4. 全新的 KaTeX数学公式 语法;
  5. 增加了支持甘特图的mermaid语法1 功能;
  6. 增加了 多屏幕编辑 Markdown文章功能;
  7. 增加了 焦点写作模式、预览模式、简洁写作模式、左右区域同步滚轮设置 等功能,功能按钮位于编辑区域与预览区域中间;
  8. 增加了 检查列表 功能。

功能快捷键

撤销:Ctrl/Command + Z
重做:Ctrl/Command + Y
加粗:Ctrl/Command + B
斜体:Ctrl/Command + I
标题:Ctrl/Command + Shift + H
无序列表:Ctrl/Command + Shift + U
有序列表:Ctrl/Command + Shift + O
检查列表:Ctrl/Command + Shift + C
插入代码:Ctrl/Command + Shift + K
插入链接:Ctrl/Command + Shift + L
插入图片:Ctrl/Command + Shift + G
查找:Ctrl/Command + F
替换:Ctrl/Command + G

合理的创建标题,有助于目录的生成

直接输入1次#,并按下space后,将生成1级标题。
输入2次#,并按下space后,将生成2级标题。
以此类推,我们支持6级标题。有助于使用TOC语法后生成一个完美的目录。

如何改变文本的样式

强调文本 强调文本

加粗文本 加粗文本

标记文本

删除文本

引用文本

H2O is是液体。

210 运算结果是 1024.

插入链接与图片

链接: link.

图片: Alt

带尺寸的图片: Alt

居中的图片: Alt

居中并且带尺寸的图片: Alt

当然,我们为了让用户更加便捷,我们增加了图片拖拽功能。

如何插入一段漂亮的代码片

博客设置页面,选择一款你喜欢的代码片高亮样式,下面展示同样高亮的 代码片.

// An highlighted block
var foo = 'bar';

生成一个适合你的列表

  • 项目
    • 项目
      • 项目
  1. 项目1
  2. 项目2
  3. 项目3
  • 计划任务
  • 完成任务

创建一个表格

一个简单的表格是这么创建的:

项目Value
电脑$1600
手机$12
导管$1

设定内容居中、居左、居右

使用:---------:居中
使用:----------居左
使用----------:居右

第一列第二列第三列
第一列文本居中第二列文本居右第三列文本居左

SmartyPants

SmartyPants将ASCII标点字符转换为“智能”印刷标点HTML实体。例如:

TYPEASCIIHTML
Single backticks'Isn't this fun?'‘Isn’t this fun?’
Quotes"Isn't this fun?"“Isn’t this fun?”
Dashes-- is en-dash, --- is em-dash– is en-dash, — is em-dash

创建一个自定义列表

Markdown
Text-to- HTML conversion tool
Authors
John
Luke

如何创建一个注脚

一个具有注脚的文本。2

注释也是必不可少的

Markdown将文本转换为 HTML

KaTeX数学公式

您可以使用渲染LaTeX数学表达式 KaTeX:

Gamma公式展示 Γ ( n ) = ( n − 1 ) ! ∀ n ∈ N \Gamma(n) = (n-1)!\quad\forall n\in\mathbb N Γ(n)=(n1)!nN 是通过欧拉积分

Γ ( z ) = ∫ 0 ∞ t z − 1 e − t d t   . \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. Γ(z)=0tz1etdt.

你可以找到更多关于的信息 LaTeX 数学表达式here.

新的甘特图功能,丰富你的文章

2014-01-07 2014-01-09 2014-01-11 2014-01-13 2014-01-15 2014-01-17 2014-01-19 2014-01-21 已完成 进行中 计划一 计划二 现有任务 Adding GANTT diagram functionality to mermaid
  • 关于 甘特图 语法,参考 这儿,

UML 图表

可以使用UML图表进行渲染。 Mermaid. 例如下面产生的一个序列图:

张三 李四 王五 你好!李四, 最近怎么样? 你最近怎么样,王五? 我很好,谢谢! 我很好,谢谢! 李四想了很长时间, 文字太长了 不适合放在一行. 打量着王五... 很好... 王五, 你怎么样? 张三 李四 王五

这将产生一个流程图。:

链接
长方形
圆角长方形
菱形
  • 关于 Mermaid 语法,参考 这儿,

FLowchart流程图

我们依旧会支持flowchart的流程图:

Created with Raphaël 2.3.0 开始 我的操作 确认? 结束 yes no
  • 关于 Flowchart流程图 语法,参考 这儿.

导出与导入

导出

如果你想尝试使用此编辑器, 你可以在此篇文章任意编辑。当你完成了一篇文章的写作, 在上方工具栏找到 文章导出 ,生成一个.md文件或者.html文件进行本地保存。

导入

如果你想加载一篇你写过的.md文件,在上方工具栏可以选择导入功能进行对应扩展名的文件导入,
继续你的创作。


  1. mermaid语法说明 ↩︎

  2. 注脚的解释 ↩︎

《The Rust Programming Language》(Rust编程语言)是一本由Rust开发社区编写的权威指南和教程,用于学习和开发Rust编程语言Rust编程语言是一种开源、现代化的系统级编程语言,具有强大的内存安全性、并发性和性能。它最初由Mozilla开发,并于2010年首次发布。Rust的设计目标是实现安全、并发和快速的系统级编程,适用于像操作系统、浏览器引擎和嵌入式设备这样的低级应用程序。 《The Rust Programming Language》提供了对Rust编程语言的全面介绍。它从基本的语法和数据类型开始,然后涵盖了Rust的所有关键概念和特性,如所有权系统、借用检查器、模块化和并发编程等。这本书不仅适合初学者,还可以作为更有经验的开发者的参考手册。 书中详细介绍了Rust的主要特性,例如所有权系统,它可以避免常见的内存错误,如空指针和数据竞争。同时,该书还着重介绍了Rust的错误处理机制和泛型编程。读者将学习如何使用Rust编写高效、安全和易于维护的代码。 《The Rust Programming Language》还包含许多实用的示例代码和练习,帮助读者通过实践加深对Rust的理解。此外,书中还介绍了一系列构建工具和库,以及有用的开发工作流程。 总之,《The Rust Programming Language》为学习和开发Rust编程语言的人们提供了清晰、全面的指南。无论您是初学者还是有经验的开发者,都可以从中受益,提高Rust编程的技能和效率。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值