[fpc-devel] tkLString vs tkAString

Michael Van Canneyt michael at freepascal.org
Tue Nov 30 13:37:12 CET 2021

On Tue, 30 Nov 2021, Marc Weustink via fpc-devel wrote:

> Hi,
> I ran into an issue with a piece of ported Delphi (6) code and RTTI. 
> Part of the Delphi code was based on strings with a RTTI type tkLString 
> where in FPC the type appeared to be tkAString. Fixing this was easy, 
> but it made me wonder what the difference is between them.
> From the documentation:
>  Source position: rttih.inc line 22
>   type TTypeKind = (
>   ...
>   tkLString,  Longstring property.
>   tkAString,  Ansistring property.
> So there is apparently a LongString type and an AnsiString type. However 
> if you search (google) the documentation on LongString, you only find 
> references to AnsiString.
> My question: What is the difference (if any) ?

This dates from long ago...

Longstring was an idea for a shortstring/ansistring kind of string - 
unlimited length but no reference counting.

But it was never fully implemented.


More information about the fpc-devel mailing list