计算机专业英语Unit04_SectionA_Computer_Program

更新时间:2023-09-03 04:16:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Unit 4 Software Development Section A Computer Program

Computer Program-IntroductionI.Introduction A computer program is a set of instructions that directs a computer to perform some processing function or combination of functions. For the instructions to be carried out, a computer must execute a program, that is, the computer reads the program, and then follows the steps encoded in the program in a precise order until completion.I. 引言 计算机程序是指挥计算机执行某种处理功能或功能 组合的一套指令。要使指令得到执行,计算机必须执行程序, 也就是说,计算机要读取程序,然后按准确的顺序实施程序中 编码的步骤,直至程序结束. 编码2/56

Computer Program-IntroductionA program can be executed many different times, with each execution yielding a potentially different result depending upon the options and data that the user gives the computer.Yield: vt. 生产,释放,让步The child pleaded, but the parents wouldn't yield. 一个程序可多次执行,而且,取决于用户提供给计算机的选项和数据,每次执行可能产生 可能产生不同的结果。 可能产生

3/56

Computer Program-IntroductionPrograms fall into two major classes: application programs and operating systems. An application program is one that carries out some function directly for a user, such as word processing or game playing.程序分为两大类:应用程序和操作系统。应用程序直接为用 类 户执行某种功能,如处理文字或玩游戏.

4/56

Computer Program-IntroductionAn operating system is a program that manages the computer and the various resources and devices connected to it, such as RAM (random access memory) , hard drives, monitors, keyboards, printers, and modems, so that they may be used by other programs. Examples of operating systems are DOS, Windows 95, OS/2, and UNIX.操作系统管理计算机以及与之相连的各种资源和设备,如随机 随机 存储器、硬盘驱动器、监视器、键盘、打印机和调制解调器, 存储器 以便其他程序可以使用它们。操作系统的例子包括:DOS、 Windows 95、OS/2和UNIX。5/56

Computer Program-Program DevelopmentII. Program Development Software designers create new programs by using special applications programs, often called utility programs or development programs. A programmer uses another type of program called a text editor to write the new program in a special notation called a programming language.II. Notation: 标记,符号 figure 程序开发 软件设计者通过特殊的应用程序来开发新程序,这些应用程 notation数字标记 binary notation 序常被称作实用程序 实用程序或开发程序。程序员使用称作文本编辑 实用程序 文本编辑 二进制计数法 程序)的另一种程序,来以称作编程语言的特殊符号编写 器(程序 程序 新程序。 6/56

Computer Program-Program Developme

nt With the text editor, the programmer creates a text file, which is an ordered list of instructions, also called the program source file. The individual instructions that make up the program source file are called source code.Make up: 编制;弥补;化妆 she is very 使用文本编辑器,程序员创建一个文本文件,这个文本文 件是一个有序指令表,也称为程序源文件 源文件。构成程序源文 源文件 much made up. 件的单个指令被称为源代码 源代码。 源代码 Makeup: 化妆品;组成成分,构成方式。 Sb. put on their makeups.7/56

Computer Program-Program Development At this point, a special applications program translates the source code into machine language, or object code —a format that the operating system will recognize as a proper program and be able to execute.在这个时候,一种专门的应用程序将源代码翻译成机器 目标代码——操作系统将认作真正程序并能够执 语言或目标代码 目标代码 行的一种格式。

8/56

Computer Program-Program DevelopmentThree types of applications programs translate from source code to object code: compilers, interpreters, and assemblers. The three operate differently and on different types of programming languages, but they serve the same purpose of translating from a programming language into machine language.将源代码翻译成目标代码的应用程序有3种:编译器(程序)、 解释器(程序)和汇编器 程序)。这3种应用程序在不同类型 汇编器(程序 汇编器 程序 的编程语言上执行不同的操作,但是它们都起到将编程语 言翻译成机器语言的相同目的。9/56

Computer Program-Program DevelopmentA compiler translates text files written in a highlevel programming language—such as FORTRAN, C, or Pascal—from the source code to the object code all at once. This differs from the approach taken by interpreted languages such as BASIC, in which a program is translated into object code statement by statement as each instruction is executed.编译程序将使用FORTRAN、C和Pascal等高级编程语言编写的 文本文件一次性从源代码翻译成目标代码。这不同于BASIC等 解释执行的语言所采取的方式,在解释执行的语言中程序是随 解释执行的语言 着每条指令的执行而逐个语句地翻译成目标代码的。10/56

Computer Program-Program DevelopmentThe advantage of interpreted languages is that they can begin executing the program immediately instead of having to wait for all of the source code to be compiled. Changes can also be made to the program fairly quickly without having to wait for it to be compiled again.解释执行的语言的优点是,它们可以立即开始执行程序, 而不需要等到所有的源代码都得到编译。对程序的更改也 Fairly: 公平地 I think I was fairly treated 可以相当快地作出,而无需等到重新编译整个程序。

by t

he police;相当地 This is a fairly easy book;完全的,简直 It fairly destroyed the machine.

11/56

Computer Program-Program DevelopmentThe disadvantage of interpreted languages is that they are slow to execute, since the entire program must be translated one instruction at a time, each time the program is run. On the other hand, compiled languages are compiled only once and thus can be executed by the computer much more quickly than interpreted languages.解释执行的语言的缺点是,它们执行起来慢,因为 每次运行程序,都必须对整个程序一次一条指令地翻译。 另一方面,编译执行的语言 编译执行的语言只编译一次,因此计算机执行 编译执行的语言 起来可比解释执行的语言快得多12/56

Computer Program-Program Development For this reason, compiled languages are more common and are almost always used in professional and scientific applications.由于这个原因,编译执行的语言比解释执行的语 言常用,而且,在专业和科学领域几乎总是应用 编译执行的语言。

13/56

Computer Program-Program Development Another type of translator is the assembler, which is used for programs or parts of programs written in assembly language. Assembly language is another programming language, but it is much more similar to machine language than other types of highlevel languages.另一种翻译程序是汇编程序,它用于以汇编语言编写的程序 或程序组成部分。汇编语言也是一种编程语言,但它远比其 他类型的高级语言类似于机器语言14/56

Computer Program-Program Development In assembly language, a single statement can usually be translated into a single instruction of machine language. Today, assembly language is rarely used to write an entire program, but is instead most often used when the programmer needs to directly control some aspect of the computer’s function.在汇编语言中,一个语句通常可以翻译成机器语言的一条指 令。今天,汇编语言很少用来编写整个程序,而是最常用于 程序员需要直接控制计算机某方面功能的情况下。15/56

Computer Program-Program DevelopmentPrograms are often written as a set of smaller pieces, with each piece representing some aspect of the overall application program. After each piece has been compiled separately, a program called a linker combines all of the translated pieces into a single executable program. Overall: adj. 总体的,全面考虑的, We did an overall consideration 程序经常被编写作一套较小的程序段,每段代表 of the matter at last. 全盘的考虑 整个应用程序的某个方面。各段独立编译之后, 一种被称为连接程序的程序将所有编译好的程序 段组合成一个可以执行程序。16/56

Computer Program-Program Development Programs seldom work correctly the first time, so a program called a debugger is often used to help

find problems called bugs. Debugging programs usually detect an event in the executing program and point the programmer back to the origin of the event in the program code.程序很少有第一次能够正确运行的,所以一种被称为调试 调试 程序的程序常被用来帮助查找被称为程序错误 程序错误的问题。调 程序 程序错误 调 试程序通常在运行的程序中检测到一个事件,并向程序员 指引到事件在程序代码中的起源处。17/56

Computer Program-Program DevelopmentRecent programming systems, such as Java, use a combination of approaches to create and execute programs. A compiler takes a Java source program and translates it into an intermediate form. Such intermediate programs are then transferred over the Internet into computers where an interpreter program then executes the intermediate form as an application program.最近出现的编程系统,如Java,采取多种方法相结合的方 式创建和执行程序。编译器(程序)取来Java源程序 源程序,并将其 源程序 翻译成中间形式。这样的中间程序随后通过因特网传送给 计算机,而这些计算机里的解释程序 解释程序接下来将中间程序作 解释程序 为应用程序来执行。 18/56

Computer Program- Program ElementsIII Program Elements Most programs are built from just a few kinds of steps that are repeated many times in different contexts and in different combinations throughout the program. The most common step performs some computation, and then proceeds to the next step in the program, in the order specified by the programmer.III 程序元素 大多数程序只是由少数几种步骤构成,这些步骤在整个程 序中在不同的上下文和以不同的组合方式多次重复。最常 见的步骤执行某种计算,然后按照程序员指定的顺序,进 入程序的下一个步骤。

19/56

本文来源:https://www.bwwdw.com/article/wsri.html

Top