[fpc-devel] Read from memory stream with position before start of file
webpirat at mail.ru
Thu Jan 1 17:48:25 CET 2009
Michael Van Canneyt wrote:
>> If you do an exception or silent change of position it can cause
>> incompatibilities. Maybe read operation must be fixed to ignore positions out
>> of the range 0..Size -1?
> What does Delphi do in such a case ?
procedure TForm1.Button1Click(Sender: TObject);
S := TMemoryStream.Create;
B := 1;
S.Position := -1;
Count := S.Read(B, SizeOf(B));
Count = 0. IOW, delphi does not read if position < 0
More information about the fpc-devel