On Tue, 14 Jun 2005 [EMAIL PROTECTED] wrote:

> What is the main difference between the shortstrings (256 byte) and the ANSI 
> Strings?

Shortstrings are on the stack, and have the length stored in the 0-th byte.
AnsiStrings are on the heap, and have their length stored somewhere hidden.
Ansistrings are more like the C PChar when it comes to memory layout.

This means that
  MyString[0]:=char(13)
will not work for an ansistring.

> I mean, upon using the Strings, we have plenty of functions, manipulating the 
> string,
> while with ANSIStrings we have certain difficulties obtaining the same result
> This is ranging from Pos(), Delete(), String addition, and so on...

All standard FPC functions work with AnsiStrings and ShortStrings.

Can you give an example of code or a function that does not work ?

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to