< previous page page_12 next page >

Page 12
0012-01.gif
Figure 1-5
High-Level Programming Languages Allow Programs to Be Compiled on Different Systems
A program in a high-level language is called a source program. To the compiler, a source program is just input data. It translates the source program into a machine language program called an object program (see Figure 1-5). Some compilers also output a listinga copy of the program with error messages and other information inserted.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif 3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
Source Program A program written in a high-level programming language.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif 3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
Object Program The machine language version of a source program.
A benefit of standardized high-level languages is that they allow you to write portable (or machine-independent) code. As Figure 1-5 emphasizes, a single C++ program can be run on different machines, whereas a program written in assembly language or machine language is not portable from one computer to another. Because each computer has its own machine language, a machine language program written for computer A will not run on computer B.

 
< previous page page_12 next page >