[fpc-devel]FreePascal and AnsiStrings

David Butler david at e.co.za
Fri Nov 7 13:09:10 CET 2003

Hi FPC developers

I see FreePascal uses the following internal format for AnsiStrings:

Ptr - 8 : Length
Ptr - 4 : Reference Count
Ptr : Characters

Delphi uses the following format:

Ptr - 8 : Reference Count
Ptr - 4 : Length
Ptr : Characters

My questions are:

1. Is the order purely incidental or is there a reason why FreePascal
chose to use a different order than Delphi?

2. I know it is officially discouraged to use 'internal formats', but
for optimization's sake, would it be safe to assume that the internal
format for FreePascal's AnsiStrings will not change in the near


More information about the fpc-devel mailing list