Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
Compile Problem With Variant Array |
Thu, Feb 22 2018 10:21 AM | Permanent Link |
Frederick Chin | I have a variant array defined as follows:-
var aTest : array of Variant; begin setlength(aTest, 1); aTest[0]:=False; TLabel1.Visible:=not aTest[0]; // Compiles OK if not aTest[0]. then // Compiler says "Expected boolean or integer but instead found not aTest[0] TLabel1.Visible:=False; end; Is this expected behaviour and if yes, why? -- Frederick |
Thu, Feb 22 2018 3:28 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Frederick,
<< Is this expected behaviour and if yes, why? >> No, it's a "limitation" in the compiler. It's not quite a bug because variants were originally only added to support JSON persistence and not actually documented, but they've been expanded over time to be used by everyone so I will make sure that this is fixed. Tim Young Elevate Software www.elevatesoft.com |
Fri, Feb 23 2018 5:38 PM | Permanent Link |
Frederick Chin | Tim,
/* No, it's a "limitation" in the compiler. It's not quite a bug because variants were originally only added to support JSON persistence and not actually documented, but they've been expanded over time to be used by everyone so I will make sure that this is fixed. */ Thanks. I've worked around it for now by using: if aTest[0]=False then TLabel1.Visible:=False; -- Frederick |
This web page was last updated on Sunday, December 1, 2024 at 03:59 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |