页数:18页文件大小:99.7 KB来源: 计算机专业英语ppt课件
本课件对应5.2 Introduction of Programming Languages(程序设计语言概述)一节,比较机器语言、汇编语言与高级语言的特点,说明编译与解释两种执行方式及语言的选择依据。课文配中英文对照译文、生词短语表与课后练习,可用于课堂讲授与课前预习。
| 单词 | 词性 | 中文释义 |
|---|---|---|
| assembler | n. | 汇编程序 |
| compact | adj. | 紧凑的,简洁的 |
| compile | v. | 编译 |
| complexity | n. | 复杂性 |
| dozen | n. | 一打,十二个cross-platform跨平台 |
| cross-platform跨平台instruction | n. | 指示,指令 |
| interpret | v. | 解释,口译 |
| JavaScript | n. | Java描述语言 |
| 单词 | 词性 | 中文释义 |
|---|---|---|
| Perl | n. | 一种通用编程语言,可用于网络环境 |
| pretend | v. | 假装 |
| specific | n. | 细节 |
| adj.特殊的,特效的stage | n. | 舞台,活动场所,发展的进程,阶段 |
| stuff | n. | 原料,素材资料 |
| v.填充trick | n. | 诡计,骗局,诀窍 |
| 短语 | 中文释义 |
|---|---|
| and Abbreviationsdue to | 由于,应归于 |
| dynamic advertisements | 动态的广告 |
| Mac OSMac | 操作系统 |
| scripting languages | 脚本语言 |
| super set | 超集,父集 |
| virtual machine | 虚拟计算机 |
| ASP(Active Server Page) | 动态服务器主页 |
| VBScript(Visual Basic Script) | 描述语言 |
程序设计语言介绍程序设计语言是一个定义明确的指令集,用于使计算机执行特定任务。程序设计语言使用专用词汇编写,被计算机编译或解释成处理器可以识别的机器语言。常用的程序设计语言类型如下:
A programming language is a defined set of instructions that are used to make a computer perform a specific task. Written using a defined vocabulary the programming language is either complied or interpreted by the computer into the machine language that is understood by the processor. There are several types of programming languages, the most common are:
高级语言——使用接近人类语言的短语、词汇和书写方式。之所以被称为高级语言,是因为它们去除了计算机所能理解的原始机器语言所包含的复杂性。高级语言相对于低级语言的主要优点是它们易于读写和维护。所有高级语言都要在某个阶段翻译成机器语言。最早的高级语言大约出现于20世纪50年代。现在有很多种高级语言,包括BASIC、COBOL、C、C++、FORTRAN和Pascal等。
High-level Languages—these are written using terms and vocabulary that can be understood and written in a similar manner to human language.[1]They are called high-level languages because they remove many of the complexities involved in the raw machine language that computers understand. The main advantage of high-level languages over low-level languages is that they are easier to read, write, and maintain. All high-level languages must be compiled at some stage into machine language. The first high-level programming languages were designed in the 1950 s. Nowthereare dozens of different languages, including BASIC, COBOL, C, C++, FORTRANand Pascal.分析:本句是复合句。原因状语从句中的involved in the raw machine languages that computers understand为过去分词短语,作complexities的后置定语。
Scripting Languages—like high-level languages, scripting languages are written in manner similar to human language. Generally, scripting languages are easier to write than high-level languages and are interpreted rather than compiled into machine language. Scripting languages, which can be embedded within HTML, commonly are used to add functionality to a Webpage, such as different menu styles or graphic displays, or to serve dynamic advertisements.
脚本语言——类似于高级语言,脚本语言用与人类语言相似的方式书写。一般来说,用脚本语言编程比用高级语言更容易,并且脚本语言采用解释方式而不是编译方式转换成机器语言。脚本语言可以被嵌入HTML,经常被用来在网页中添加功能(如不同的菜单风格或图形显示)或提供动态广告。
Thesetypesof languages are client-side scripting languages, affecting the data that the end users eesina browser window. Other scripting languages are server-side scripting languages that manipulate the data, usually in a database, on the server. Scripting languages came about largely because of the development of the Internetasa communications tool. Some examples of scripting languages include VBScript, Java Script, ASPand Perl.
这种类型的语言是客户端脚本语言,影响终端用户在浏览器窗口看到的数据。另一种是服务器端的脚本语言,操作服务器端数据库中的数据。脚本语言产生的很大原因是作为通信工具的Internet的发展。脚本语言的例子包括VBScript、JavaScript、ASP和Perl。
汇编语言——汇编语言尽可能的接近机器语言。由于汇编语言的低级特性,它和处理器的类型密切相关,在一种CPU类型上编写的程序一般不能在另一种类型上运行。
Assembly Language—assembly language is as close as possible to writing directly in machine language. Duetothelow level nature of assembly language, it is tied directly to the type of processor and a program written for one type of CPUgenerally will not run on another.
机器语言——最低级的编程语言。机器语言是惟一能直接被计算机识别的语言。易于被计算机理解的同时,机器语言几乎不能被人类使用,因为它们完全由数字组成。所以程序员使用高级语言或汇编语言。汇编语言的指令与机器语言对应,但是汇编语言中的指令或变量用名字表示而不是用数字表示。
Machine language—The lowest-level programming language. Machine languages are the only languages understood by computers. While easily understood by computers, machine languages are almost impossible for humans to use because they consist entirely of numbers. Programmers, therefore, use either a high-level programming language or an assembly language. An assembly language contains the same instructions as a machine language, but the instructions and variables have names instead of being just numbers.
用高级语言编写的程序要通过编译器翻译成汇编语言或机器语言。汇编语言的程序通过汇编程序翻译成机器语言。
Every CPUhasitsown unique machine language. Programs must be rewritten or recompiled, therefore, to run on different types of computers.
每种CPU有自己专用的机器语言。当用于不同类型的计算机时,程序需要重写或重新编译。
Programs written in high-level languages are translated into assembly language or machine language by a compiler. Assembly language programs are translated into machine language by a program called an assembler.
下面简要介绍几种主流软件工业中专业程序员采用的高级语言·CThisis probably the most widely-used,and definitely the oldest,of the three languages I mentioned. It's been in use since the 70 s,and is a very compact(i.e.notmuch"vocabulary"tolearn),powerful and well-understood language.这可能是提到的三种语言中应用最广最久的一种语言。从20世纪70年代开始应用,是一种紧凑(即不需要学习太多词汇)、功能强并且易于理解的语言。
For now, let's talk about some high level languages very briefly, which are used by professional programmers in the current mainstream software industry.
这种语言是C的超集(也就是说,是C的扩充,比C增加了很多,包括C的全部)。C++相对于C的主要优点是面向对象。关键的一点是面向对象的语言更现代化,使用该语言是当今程序设计领域处理事务的方式。所以C++无疑是应用广泛度仅次于C的语言,并且很快会成为应用最为广泛的语言。
·C++
This language is a superset of C(that just means that it's Cwithmore stuff added;it'smorethanC,and includes pretty much all of C).Itsmain benefit over Cisthatit's objectoriented.[2]Thekeypoint is that objectoriented languages are more modern,and using objectoriented languages is the way things are done now in the programming world. So C++is most definitely the second-most used language after C,and may soon become the most used language.分析:本句是and连接的并列句。在后一个分句中,using objectoriented languages是动名词短语作主语,位于后面的动词用单数is;things are done now in the programming world为定语从句,修饰theway。修饰way,distance,direction等名词的定语从句,通常可不用起连接作用的词,有时也可用that,但这时that在定语从句中作状语。
Java有一个别的语言所没有的优点:它是跨平台的。也就是说,它不需要重新编译就可以运行于多个平台。一个平台就是一种计算机系统的类型,比如Windows、MacOS或Linux。一般来说,如果你在一个平台上编写了程序,想到另一个平台上去运行,需要重新编译——你需要为不同的平台编译不同的版本。有时候,你还需要更改代码以适应新的平台。这也许不奇怪,因为不同的平台工作不同,并且外观也不同。
·Java
Javahasa benefit which other programming languages lack: it's cross-platform. It means that it runs on more than one platform without needing to be recompiled. Aplatformis just a particular type of computer system, like Windows or Mac OSor Linux. Normally, if you wanted to use the same program on a different platform from the one it was written on, you'd have to recompile it—you'd have to compile a different version for each different platform. Sometimes, you'd also need to change some of your code to suit the new platform. This probably isn't surprising, since the different platforms work differently, and look different.
Javahas another advantage that it runs inside web browsers, letting programmers create little applications which can run on websites. However, Javaalsohasa disadvantage, which is almost as serious: it's slow. Javaachieves its cross-platform trick by putting what is essentially a big program on your computer which pretends to be a little computer all of its own.
Java还有一个优点,就是可以运行于Web浏览器,使程序员创建能够运行在Web站点的小的应用程序。但是,Java也有缺点,并且很严重,就是它速度慢。Java实现跨平台的诀窍是通过在计算机上放置一个实质上很大的程序,假装有自己的小计算机。
The Javaruns inside this"virtual machine", which runs on whatever platform you're using (like Windows or Mac OS). Because of this extra layer between the program and the computer's processor chip, Javaisslower than a program written and compiled natively for the same platform. Anyway, asthe Internet develops, Javawillbe used more widely.
Java运行于这个虚拟机中,而虚拟机运行于任何一种平台(像Windows或MacOS)上。因为在程序和计算机处理器芯片之间又附加了这么一层,Java的运行比在原平台上编写并编译的程序慢。无论如何,随着Internet的发展,Java会得到更多的应用。
习题5.2 一 判断正误:根据课文内容判断下列说法正误。
Put“true”or“false”in the brackets for the following statements according to the passage.
习题5.2 二 练习:根据课文内容完成下列练习。
Fillinthe blanks according to the passage.
习题5.2 三 翻译:将下列单词和短语译成中文。
Translate the following words and expressions into Chinese.
下载地址:{{downurl}}
{{{a}}}
{{#b}}{{{b}}}
{{/b}} {{/title}} {{#nolog}}登陆注册
{{/nolog}} {{#djsx}}点我刷新
{{/djsx}} {{#gocz}} {{/gocz}} {{#ffqr}} {{/ffqr}}