473,396 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

please explain clearly what actually happens after i click on COMPILE

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

Feb 28 '06 #1
5 1641
z
detail needed for expain
srikanth wrote:
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


Feb 28 '06 #2
"srikanth" wrote:
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
Feb 28 '06 #3
srikanth wrote:
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.
--
==============
Not a pedant
==============
Feb 28 '06 #4

"z" <ma*********@gmail.com> schrieb im Newsbeitrag
news:11*********************@z34g2000cwc.googlegro ups.com...
detail needed for expain
the detail is what looks like a signature

srikanth wrote:
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


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~
Feb 28 '06 #5
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).

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Feb 28 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: hope | last post by:
Hi Access 97 I'm lost on this code please can you help ================================= Below is some simple code that will concatenate a single field's value from multiple records into a...
2
by: makthar | last post by:
Thanks for taking the time to read this note Can anyone explain what went wrong and any ideas how to fix it I have a search page With three buttons few drop downs and a textbox. The search...
4
by: BluDog | last post by:
Hi I am trying to test dynamically created controls, to do this i have added a placeholder to a WbForm and added the following code behind: Private Property Count() As Integer Get If...
22
by: Colin McGuire | last post by:
I apologize for posting yet another scrollbar question. Here is my code. All I want is for a diagonal line to appear from coordinates (0,0) to (width,height) in a usercontrol regardless of whether...
118
by: 63q2o4i02 | last post by:
Hi, I've been thinking about Python vs. Lisp. I've been learning Python the past few months and like it very much. A few years ago I had an AI class where we had to use Lisp, and I absolutely...
10
by: honey | last post by:
I have downloaded c api that have many h file and c file and one main file. I use turbo c compiler. So I put header files under C:\tc\include and I put c files under C:\tc\bin I also declare...
33
by: Martin Jørgensen | last post by:
Hi, In continuation of the thread I made "perhaps a stack problem? Long calculations - strange error?", I think I now got a "stable" error, meaning that the error always seem to come here now...
5
by: Jang | last post by:
I noticed something interesting while I was doing some JavaScript. Lets say I have the code below (simplified greatly from what I have but it's just about the same). var objs = {'foo' : {},...
8
by: sachinv1821 | last post by:
hi all i have simple Problem please tell me the Solution if u know?? main() { int a={1,2,3,4,5,6,7,8,9}; printf("%u %u %u",a,a,a); } when i execute this program i am getting a Fixed address...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.