Can someone explain this C shortcuts or macros? Is their a book or information that discusses all this shortcuts?
I'm just curios on this coz some books uses this instruction...
Thanx
[/code]
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
Posted: Sat Sep 25, 2004 5:37 am
I have no clue as to what exactly your question is, can you give me another clue?
Do you want to know more about what macro's are? If yes, then call them by their name and don't call them 'shortcuts'.
Your first example is a macro, the second is just a line of normal C code.
General questions about the C language that have nothing to do with the CCS compiler or the PIC processor shouldn't be posted here but in another forum like comp.lang.c.
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
Posted: Sat Sep 25, 2004 7:43 am
The first is an example of the "ternary operator". Very confusing to many and you should limit its use. It means the same as
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum