diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-189FBB0E-0A47-5CCC-9209-DC69E76DE6B3.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-189FBB0E-0A47-5CCC-9209-DC69E76DE6B3.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,31 @@ + + + + + +BooleanThis document describes the Boolean data types. +

TBool represents a Boolean whose value may be ETrue or EFalse. +It is implemented as a natural machine-word integer.

+

The C language defines logical expressions to produce 0 for false, +1 for true, and to interpret 0 as false, non-zero as true. This confusion +cannot be altogether avoided with TBool. It is possible, +but strongly deprecated, to assign numeric values to a TBool.

+

In general, a TBool should be tested using

+if (x) ... +

or

+if (!x) ... +

rather than

+if (x==ETrue) ... +

or

+if (x==EFalse) ... +

The TBool uses a whole machine word. When a class has +a number of flags, they should be encoded in a flags byte, and suitable getter/setter +functions, taking TBool s, should be coded to access that +flags byte.

+
\ No newline at end of file