[fpc-pascal] FPC docs wrong for TStream.WriteBuffer()

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Mon Feb 6 13:16:17 CET 2012



On Mon, 6 Feb 2012, Graeme Geldenhuys wrote:

> Hi,
>
> I'm I just not reading/understanding this correctly, or is it indeed a
> documentation bug (in which case I'll file a bug report with a patch).
>
> http://www.freepascal.org/docs-html/rtl/classes/tstream.readbuffer.html
>
>
> The "short description", as far as I'm concerned, is completely wrong
> for TStream.ReadBuffer. It reads as follows:
>
>  "Reads data from the stream to a buffer"
>
> It seems to me that it describes the flow of data going from the
> stream to the buffer parameter. But that is what TStream.WriteBuffer()
> does, not ReadBuffer()??

The explanation is correct.

ReadBuffer actually reads data from the stream to the buffer. Just like read.

Just like you read from a file. Data goes from the file to your variable.

Michael.



More information about the fpc-pascal mailing list