3
{ Program to demonstrate the TStream.Read method }
7
Var Buf1,Buf2 : Array[1..1000] of Byte;
13
Buf1[I]:=Random(1000);
15
S:=New(PMemoryStream,Init(100,10));
16
S^.Write(Buf1,SizeOf(Buf1));
20
S^.Read(Buf1,SizeOf(Buf1));
22
If Buf1[I]<>buf2[i] then
23
Writeln ('Buffer differs at position ',I);
b'\\ No newline at end of file'