[fpc-pascal] When is AnsiString not a good substitute for string?

Frank Church vfclists at googlemail.com
Sun Mar 21 14:45:23 CET 2010

I recently posted a question about problems involving the use of
string and AnsiString when converting a Delphi program. Are the some
situations where substituting AnsiString for string will result in

Does using {$mode delphi}, {H+} involve cases which might introduce
hard to track errors?

>From what I have read AnsiString is a pointer to a potentially
unlimited string, where as string has a maximum length of 255, and in
a record structure may have a fixed length in a preallocated memory.

Is it also an issue in objects and classes?

If anyone could point me to the relevant docs I would be glad.

Frank Church


More information about the fpc-pascal mailing list