Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think it would have been better to use the term <strong><em>source-to-source translator</em></strong> instead of "preprocessors" which makes it ambiguous in meaning , but it ain't any wrong to use it either.</p> <p>Basically , A compiler is a computer program translates source code from a high-level programming language to a lower level language (e.g., assembly language or machine code).But the document in the question says :</p> <blockquote> <p>Historically, compilers for many languages, including C++ and Fortran, have been <strong>implemented</strong> as “<strong>preprocessors</strong>” which emit another high level language such as C.</p> </blockquote> <p>As per this description , it can be said that earlier , the compilers were <strong>implemented</strong> as <em>source-to-source translator</em> . A translator is also a form of preprocessor but its different from the preprocessor used in a program. </p> <blockquote> <p>A translator is a computer program that translates a program written in a given programming language into a functionally equivalent program in a different language.</p> </blockquote> <p>Now, coming to <em>preprocessor used in a program</em> , lets take an example :</p> <pre><code>#include &lt;stdio.h&gt;// a PREPROCESSOR directive </code></pre> <p>A preprocessor is a program that processes a source file before the main compilation takes place,( similar to a translator ) <strong>but the difference lies in the fact that HERE it handles directives whose names begin with #</strong>.</p> <p>Here <code>#include</code> is a directive. This directive causes the preprocessor to add the contents of the <code>stdio.h</code> file to your program.This is a typical preprocessor action: adding or replacing text in the source code before it’s compiled.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload