I defined a global variable in bool type but the compiler gave me a
parse error on it. There seems no "true/false" either, but has to be
"TRUE/FALSE". The word "bool" shows as a key word in blue color. Does
vxWorks support the bool type? Thanks!
|
|
0
|
|
|
|
Reply
|
wuxianming (11)
|
2/22/2006 1:17:50 AM |
|
only in C++ language files. The 'C' language doesn't know the words
'bool' 'true' or 'false'.
david wrote:
> I defined a global variable in bool type but the compiler gave me a
> parse error on it. There seems no "true/false" either, but has to be
> "TRUE/FALSE". The word "bool" shows as a key word in blue color. Does
> vxWorks support the bool type? Thanks!
|
|
0
|
|
|
|
Reply
|
camille (193)
|
2/22/2006 2:55:27 AM
|
|
David Lindauer wrote:
> only in C++ language files. The 'C' language doesn't know the words
> 'bool' 'true' or 'false'.
>
> david wrote:
>
> > I defined a global variable in bool type but the compiler gave me a
> > parse error on it. There seems no "true/false" either, but has to be
> > "TRUE/FALSE". The word "bool" shows as a key word in blue color. Does
> > vxWorks support the bool type? Thanks!
More accurately, the 1990 C standard doesn't "know" these words. In
the 1999 standard, they defined as macros in <stdbool.h>
REH
|
|
0
|
|
|
|
Reply
|
spamjunk (312)
|
2/22/2006 2:25:21 PM
|
|