[lazarus] True and False
Marc Weustink
marc.weustink at cuperus.nl
Tue Mar 11 04:58:54 EST 2003
+ From: Luis R. Hilario B. [mailto:LuisDigital at BonBon.net]
Hi, it's not a solution for your problem, but it might prevent strange
results in the future.
+
+ In order to write some components (of the Boolean type) it is necessary
+ to make the following thing, e.g.:
+
+ CheckBox2.Checked := False; CheckBox2.Checked := True;
+
+ CheckBox2.Checked := Boolean(RecordDataI[fnFACT_SIN_EX]);
It is better not to cast a boolean like this
CheckBox2.Checked := RecordDataI[fnFACT_SIN_EX] <> 0;
has the same effect (assumed that RecordDataI contains integers), but now
you are sure CheckBox2.Checked is a "true" boolean.
At least in Delphi casting something like Boolean(1) results to true in some
expressions and to false in other
Marc
More information about the Lazarus
mailing list