Pic hitec 18 c

Thread Starter

Robin Mitchell

Joined Oct 25, 2009
819
Hi everyone,

In PIC 18 HI-TEC c MPLAB there are no boolean values. Therefor how can i set up a flag that i can toggle?

many thanks,
Robin
 

t06afre

Joined May 11, 2009
5,934
You can use the #define directive
Rich (BB code):
 #define TRUE 1
 #define FALSE 0
Also remember that you can write like this in C
Rich (BB code):
if(x)​
count++;
For any non zero value(true) of x the variable count will be incremented. Often very handy. Also read section 3.3 Supported Data Types and Variables. In the manual.
 
Thread starter Similar threads Forum Replies Date
C Programming & Languages 2
A Microcontrollers 10
Top