[fpc-devel] Variants and strings
Joost van der Sluis
joost at cnoc.nl
Mon Dec 20 14:40:07 CET 2004
Sorry, a small correction:
> var v : variant;
> s : string;
>
> begin
> v := 'Hello World';
> s := v;
> writeln(s);
> s := v;
> writeln(s);
> end;
>
> returns only one 'ello World' or in some cases ' d'. That's because in
> the assignment (s:=v) the memory of the Widestring is already freed
That's not true. Offcourse it's going wrong in the assignment of the
variant. (v:='Hello World')
Met vriendelijke groeten,
Joost van der Sluis
CNOC Informatiesystemen en Netwerken
http://www.cnoc.nl
More information about the fpc-devel
mailing list