This 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
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.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.