From kde-devel Sun May 29 13:43:04 2005 From: Nicos Gollan Date: Sun, 29 May 2005 13:43:04 +0000 To: kde-devel Subject: Re: Use true/false or TRUE/FALSE in KDE C++ programs? Message-Id: <200505291543.15945.gtdev () spearhead ! de> X-MARC-Message: https://marc.info/?l=kde-devel&m=111737422927041 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1083795281==" --===============1083795281== Content-Type: multipart/signed; boundary="nextPart38533114.eh1JfIEtr4"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart38533114.eh1JfIEtr4 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday May 29 2005 13:27, Richard Dale wrote: > I was wondering if there was a more correct boolean literal to use. I > noticed that the Qt docs have upper case booleans, but when I searched the > sources in kdelibs there were more instances of lower case ones. The thing with Qt is that it doesn't assume any standard-C++ features like= =20 namespaces, a working STL implementation or the standard boolean type "bool= "=20 to be present, so it defines its own of everything (just have a look at the= =20 comments in the Qt sources for the declaration of the class "Qt" in=20 qnamespace.h to get the idea of not using namespaces). By using the upperca= se=20 variety, it avoids ambiguities on systems which do have a "bool" type with= =20 true/false values. The correct literals by the C++ standard are the lowercase true/false value= s,=20 but that might cause problems on systems with Really Old(TM) compilers unle= ss=20 you handle that somehow, e.g. with autotools. =2D-=20 Got Backup? Jabber: Shadowdancer at jabber.fsinf.de --nextPart38533114.eh1JfIEtr4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBCmcbz9vaiE9zi/vERAjKrAJ4sO0JTJlXyMGLBIFLnqdNBPFapGQCgnn9r H7PcSjjZTUrbAu2DN+hw8FU= =/23F -----END PGP SIGNATURE----- --nextPart38533114.eh1JfIEtr4-- --===============1083795281== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============1083795281==--