bool data type in Code warier

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

bool data type in Code warier

1,475件の閲覧回数
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

ラベル(1)
0 件の賞賛
返信
1 返信

1,220件の閲覧回数
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 件の賞賛
返信