Preprocessing

Preprocessing is the act of processing data before it is parsed. There are numerous situations where it makes sense to do the parsing in several stages. One is where humans are the parsers, and another is in the context of computer programming. As the name suggests, preprocessing is performed by a preprocessor. The preprocessor modifies the data according to preprocessing directives that are usually placed in the input data itself. For instance, in the C programming language, where preprocessing directives are marked with a '#' at the beginning of the line, the preprocessor can implement macros, be used for including external files at different points in the file or to select blocks of code are to be sent to the compiler. The criteria can be several things, such as processor type (e.g. to resolve integer representation problems), availability of function calls (so you can provide a work-around if one is missing) and user preferences. When preprocessors support macros, calls to macro functions within the code will expand to the whole implementation of the macro before it is sent to the compiler. This can be quite useful where speed is more important than the size of the binary code, and when you need expressions that expand to more than just a function; for instance a case-block. Preprocessing is very useful to solve portability issues: depending on the target platform (that is specified to the preprocessor by some command-line argument) the application will contain specific code. For instance, when compiled for Linux, the application would read its configuation options from a file named .conf, whereas when compiled for Microsoft Windows, it would read the configuration from the registry.

See also

C preprocessor

 

<< PreviousWord BrowserNext >>
procyon
prisoner of war
privacy
proton proton chain reaction
plankton
pi day
the excellent prismatic spray
positivism
pauli effect
pat mills
pearl index
presbyterian church usa
pia colada
packbits
pub rock (australia)
phonation
principal ideal domain
pioneer program
p 38 lightning
prayer
punjabi language
power associativity
pierre de coubertin
polish notation
peyote
primary education
piedmont
palestinian views of the peace process
product of rings
posthumanism
parameter
procedure
paavo nurmi
purple heart
polyatomic ion
persecution of christians
processor
photograph
paradigm shift
public speaking
pecorino romano cheese
parity
la parrina
pr watch