bool data type in Code warier

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

bool data type in Code warier

768 Views
charudattaingal
Contributor IV

Dear Team,

 

Code warier IDE bool data type is type-def to int by default.

so is taking more memory as com-pair to actual bool data type.

 

Is it standard bool data type is supported by code warier IDE/Library ?

 

Thanks & Regards,

Charudatta

Labels (1)
0 Kudos
1 Reply

513 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Charudatta,

_Bool is a keyword in C99: it specifies a type.

Codewarrior for hcs12(x) follows c90, it doesn't have bool type but is defined as a typedef in stdtypes.h

typedef int Bool;

if user think int is too memory consumming, user can modify it to

typedef char Bool;

does this answer your question?


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos