[fpc-pascal] Blockread and buffers

Peter J. Haas fpc.ml at pjh2.de
Thu Mar 24 01:13:21 CET 2005

Hi Jonas,

on 2005-03-23T22:26:03+02:00 Jonas wrote:

> On 23 mrt 2005, at 22:16, Jeffrey Pohlmeyer wrote:

>> program vdnstbi;
>> var
>>   s:string;
>> begin
>>   str(16, s); // Variable "s" does not seem to be initialized
>>   WriteLn(s);
>> end.
>> Does "S" really need to be initialized ?

> No, that is an error in the compiler.

This is not a error, the hint would be OK, at least in Delphi mode.
See my other mail.

The error is in the RTL, the declaration should be

procedure int_str(l: longint; out s: string);

instead of

procedure int_str(l: longint; var s: string);

> I don't know whether it has already been fixed in the mean time.

This would don't be a fix, it would be the removing of a useful
feature. Or with other words, the symptoms will be removed instead of
the real 'problem'.

wkr Peter.

More information about the fpc-pascal mailing list