I am moving an old Turbo Pascal serial-port program to Lazarus, and later perhaps to Delphi. The old code uses s[0] to read the string length and declares fields as string[20]. In Free Pascal s[0] only compiles in some units, a long text gets cut at 255 characters in one place but not in another, and Length of a string containing a µ sign is one more than the number of characters I see.
What string types are actually behind the word string, and how are they stored?




