Guys, could anyone please tell me the difference between the following statements:
[code]if(OpticalEncoder)
and
[code]if(input(OpticalEncoder))
[/code]Do these work the same way in MicroC?
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
Posted: Wed May 21, 2008 4:08 am
Experiment. Put the statements in a test program that maybe blinks a led.
Somethings like learning to write have to be taught but many things can be discovered by experimenting. Coding involves a bit of teaching of syntax but if the statement compiles then experimenting is the better way to proceed.
If you have CCS C and micro C then test with both
Matro Guest
Posted: Wed May 21, 2008 5:14 am
In first case, "OpticalEncoder" is a C variable.
In second case, "OpticalEncoder" corresponds to a pin of the PIC that shall be defined through a #DEFINE directive.
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