New

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Oct 2006
Posts: 514
Reputation: Jishnu will become famous soon enough Jishnu will become famous soon enough 
Solved Threads: 26
Jishnu's Avatar
Jishnu Jishnu is offline Offline
Posting Pro

New

 
0
  #1
Jan 26th, 2007
I have seen that writing anything after the completion of any
pre-processor compiler directive does not affect either compilation or
running of the program.
i.e.
#include<conio.h> 123as!#@
#define M 100 *&^asdf
is perfectly valid.

How can such athing happen ?
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 275
Reputation: andor has a spectacular aura about andor has a spectacular aura about andor has a spectacular aura about 
Solved Threads: 29
andor's Avatar
andor andor is offline Offline
Posting Whiz in Training

Re: New

 
0
  #2
Jan 26th, 2007
I'm not shore that I understood your problem.
  1. #if 0
  2. /* you can put here anything and the compiler wouldn't consider it */
  3. #else
  4. /* while this part will be considered */
  5. #endif /* if 0 */
If you want to win, you must not loose (Alan Ford)
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,462
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1476
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: New

 
0
  #3
Jan 26th, 2007
>>#define M 100 *&^asdf
the compiler does not evaluate macros until used. If you coded something like below your compiler would complain bitterly at you
int x = M;
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC