[fpc-pascal] FPC vs Delphi's unicode string support questions
Jürgen Hestermann
juergen.hestermann at gmx.de
Sun Aug 19 10:53:59 CEST 2012
Am 2012-08-18 22:33, schrieb Sven Barth:
> The RTL mostly uses PChar to not be restricted to 255 characters (exceptions are ancient compatibility units like DOS, Objects, etc.).
> There are often overloads for ShortString and AnsiString though.
AFAIK all file handling routines use the file record definitons from \lazarus\fpc\source\rtl\inc\filerec.inc with the following definitions:
------------------------------------------
const
filerecnamelength = 255;
type
FileRec = Packed Record
Handle : THandle;
Mode : longint;
RecSize : SizeInt;
_private : array[1..3 * SizeOf(SizeInt) + 5 * SizeOf (pointer)] of byte;
UserData : array[1..32] of byte;
name : array[0..filerecnamelength] of char;
End;
------------------------------------------
So whenever you want to open a file the "name" can be no longer than 255 characters.
More information about the fpc-pascal
mailing list