Preprocessor - Research Article from World of Computer Science

This encyclopedia article consists of approximately 1 page of information about Preprocessor.
Encyclopedia Article

Preprocessor - Research Article from World of Computer Science

This encyclopedia article consists of approximately 1 page of information about Preprocessor.
This section contains 209 words
(approx. 1 page at 300 words per page)

A preprocessor is a program that transforms data or a computer language into suitable input for another program or a compiler. A preprocessor performs preliminary operations on data, such as organization, formatting, and computation, before that data is passed on for further processing. For example, in the C programming language the line #define PI 3.14159 instructs the preprocessor to replace every occurrence of PI with the numerical value 3.14159. In the case of a computer program, a preprocessor may be used to transform a program into a simpler or less complete computer language, for example, transforming C++ into C. This processing operation can detect and correct problems in code before the compiler can reject them.

Preprocessor operations can be similar to macro expansions. Macro expansion replaces an instruction with a sequence of instructions prior to assembly or compiling. However, preprocessors differ from compilers. A compiler translates a high-level language into assembly or machine language. A preprocessor does not translate code into machine language, but transforms into suitable language for the compiler.

Preprocessing may require data or computer programs to be translated twice. The source data or program is inputted into the preprocessor. The preprocessor then passes the modified code to the compiler, which then translates it into machine code.

This section contains 209 words
(approx. 1 page at 300 words per page)
Copyrights
Gale
Preprocessor from Gale. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.