LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

stdbool.h ?

Hi all,

I would like to use Bool type... and so I was looking for the stdbool.h.
It isnt part of the ansi-c library ?

thanks, David
0 Kudos
Message 1 of 4
(3,549 Views)
No, the boolean data type is not defined in the ANSI-C specification and is not available in CVI.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 4
(3,549 Views)
Hi David,

There is not a boolean data type in the C language; it does not have the traditional view about logical comparison, but that's another story. On the other hand, recent C++ compilers (such as Borland and Visual c++) do have a boolean datatype.
One common way to work around this limitation is to type-define your own boolean data type. For example,

typedef unsigned char bool; // use only one byte of memory
OR
typedef unsigned int bool;


Regards,
Azucena
0 Kudos
Message 3 of 4
(3,549 Views)
is part of the latest C99 standard (ISO/IEC 9899:1999).
It seems LabWindows/CVI only supports the older C89 standard.
0 Kudos
Message 4 of 4
(3,549 Views)