Encyclopedia > Compile-time

  Article Content


In computer science, compile-time, as opposed to run-time, is the compiling phase in which code written in one programming language is translated into another language.

Because some information are only available for compiler and some other are only can be extracted in runtime, certain tasks can be done in compile-time and some in runtime. Typically in compile-time the following tasks can be done: Type-checking[?], Static binding[?], enforcing scoping rules, instantiating of templates[?], optimization. Those are also called semantic analysis. Typically the following tasks might not be done: boundary check of an array, dynamic binding[?].

Compile-time errors are those detected already during compilation, i.e. before even starting execution.

In compile-time, some tasks that cannot be done in a run-time environment can be done. See cross-compiler[?].

When an interpreter is used there may be no separation between compile-time and run-time. There may instead be a interpretation phase (often into bytecode) followed by execution, but performed by the same software and not exposed to the user. A type of error that would otherwise be a compile-time error, will then be detected in the course of executing the program.

See also: compiler, run-time, binding

All Wikipedia text is available under the terms of the GNU Free Documentation License

  Search Encyclopedia

Search over one million articles, find something about almost anything!
  Featured Article
Charles V, Holy Roman Emperor

... While Francis was persuaded to sign a peace treaty in 1538, he again allied himself with the Ottomans in 1542. In 1543 Charles allied himself with Henry VIII and forced ...

This page was created in 36 ms