ShortString - A counted string with a maximum length of 255 characters. Equivalent to String in Delphi 1.0. Here are the compatibility issues. Although most string code works interchangeably between short strings and long strings, there are certain short-string operations that either won't work on long strings at all or which operate more efficiently when done a different way. The following table summarizes these changes.
All long strings are dynamically allocated, so PString is redundant and requires more bookkeeping.
You can typecast long strings into null-terminated strings. The address of the long string is the address of its first character, and the long string is followed by a null. P Long strings can automatically copy from null-terminated strings. Variant Type Delphi 2.0 introduces variant types to give you the flexibility to dynamically change the type of a variable. This is useful when implementing OLE automation or certain kinds of database operations where the parameter types on the server are unknown to your Delphi-built client application.