[lazarus] "Variant" variable ?
Marc Weustink
Marc.Weustink at cuperus.nl
Thu Apr 27 04:38:59 EDT 2000
+ From: michael@[195.207.84.152] [mailto:michael@[195.207.84.152]]On
+ Behalf Of Michael Van Canneyt
+
+ On Thu, 27 Apr 2000, Marc Weustink wrote:
+
+ > Is there a check on this? I allways thought that 1 and 2 are just
+ > placeholders?
+
+ There is no check; you must do the check. The point is that
+ there are 2 constructs
+
+ Case A : Integer of
+ 1 : (X : String;);
+ 2 : (Y : Longint);
+ end;
+
+ Here you can set A and thus have an indication which of X or
+ Y you should access. (i.e. A is a normal field of the record)
Ah, as I thought. A is like a reminder for you as developer which filed to
use.
Marc
More information about the Lazarus
mailing list