Problem with variants
-
- Registered: Oct 30, 2008
- Last visit: Mar 18, 2009
- Posts: 10
Hi
I have this weird problem with variants used in records, defined in one unit and used as local variables in another unit.
Example :
Code
Unit Unit2;
Interface
Type
Vtest = record
i2 : variant;
end;
Implementation
Initialization
End.
-------8<-----------
Unit Unit1;
...
uses
unit2;
Procedure TForm1.Button1OnClick (Sender: TObject);
var
v : vtest;
Begin
v.i2 := 1;
End;
....
When trying to compile unit1 I get the error message :
Fatal Error at [43,0] Unit1.pas "Undefined identitier (UNIT2.!T!VTEST510178)"
Looking in UNIT2.ASM I find :
Code
UNIT25.!T!VTEST1411 PROC NEAR32
And looking in UNIT1.ASM I find :
Code
//Free local variable that contains AnsiStrings or Variants:V
LEA ESI,[EBP-16]
PUSH ESI
PUSH @UNIT2.!T!VTEST510178
CALLN32 SYSTEM.!FREEVARIANTANSITYPE
Kim Foder
- Moderated by:
- Admins-Forum
Users on-line
- 0 users
This list is based on users active over the last 30 minutes.