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.
Source Program A program written in a high-level programming language.
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.