please explain clearly what actually happens after i click on COMPILE

S

srikanth

what are the processes that happen after compile starts





//////////////////
-----------------------------why is it i find 150 or 100 lines compiled
in the message box though it is a 10 or 09 lines program
 
O

osmium

srikanth said:
what are the processes that happen after compile starts





//////////////////
-----------------------------why is it i find 150 or 100 lines compiled
in the message box though it is a 10 or 09 lines program

Try posting in alt.occult.methods
 
P

pemo

srikanth said:
what are the processes that happen after compile starts





//////////////////
-----------------------------why is it i find 150 or 100 lines
compiled in the message box though it is a 10 or 09 lines program

You're probably including a header file, although the program you entered is
just a few lines.

The compiler has to process your program after any #include directive has
been processed, i.e. #include<stdio.h> has been *replaced* by the contents
of the file stdio.h by the pre-processor - thus the larger number of lines
the compiler is claiming that it's compiled.
 
F

Frank Schmidt

z said:
detail needed for expain

the detail is what looks like a signature


Before the real compile starts a so called "preprocessor" handels
"preprocessor commands". One of such command is for example "#include",
which you can imagine as "insert the content of the file here". This way
your Program gets bigger then you expect.


f~
 
R

Richard Heathfield

srikanth said:
what are the processes that happen after compile starts

The compilation process involves seven distinct translation phases (there is
an eighth, but that's to do with linking, not compilation). The
implementation is free to merge separate phases as long as this doesn't
change the behaviour of the resulting code.

The phases are:

1) Translation from physical environment to source environment, if
necessary, and trigraph replacement.

2) Line splicing.

3) Decomposition into preprocessing tokens, and comment removal.

4) Preprocessing (#include, #define, and all that).

5) Conversion of character constants and string literals from the source
character set into the execution character set.

6) Concatenation of string literals.

7) Compilation (or interpretation).
-----------------------------why is it i find 150 or 100 lines compiled
in the message box though it is a 10 or 09 lines program

It is probably because your implementation is reporting on the total number
of lines, including those resulting from a #include (possibly a standard
header).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top