aspose file tools*
The moose likes C / C++ and the fly likes Macros Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "Macros" Watch "Macros" New topic
Author

Macros

Ramesh Pramuditha Rathnayake
Ranch Hand

Joined: Oct 31, 2012
Posts: 175
    
    1



This prints:
36, 4
25, 5

Why i is still 4 in first case..?


Ramesh-X
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40034
    
  28
But my slightly different version produces 36, 6 and 25, 5. I suspect it is not strictly defined; I would suggest you will have to emulate the OP in this thread and go through the language specifications.

By the way: I thought you should always have () round the expressions in macros.
Ramesh Pramuditha Rathnayake
Ranch Hand

Joined: Oct 31, 2012
Posts: 175
    
    1

Yes.. I know the importance to have () in macros. I didn't need to use it here..

I know that I've made the same mistake that I have done in my previous thread.. I know C is a real maze.

I understand that compiler is the reason for all of these stuff..!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Macros