[fpc-pascal] pchar with more than 255 characters

Rainer Stratmann RainerStratmann at t-online.de
Sun Nov 13 01:39:30 CET 2011


procedure getchars( p : pchar );
var l : longint;
begin
 l := length( p );
end;

If calling getchars with chars longer than 255 l is always 255.

For example:
getchars( '12345 ... 255256257258' +
                '1234567213939873987' +
               ...
               ...
                '1234567213939873987');  // more than 255 chars


Version 2-4-2.0

With other Versions before 2-4-2.0 it was ok (more chars than 255 possible).
It seems that this is a bug.
May be it is resolved already.



More information about the fpc-pascal mailing list