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

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Feb 6 13:13:34 CET 2012


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()??

Then in the "long description" in correctly explains the method.

  "ReadBuffer reads Count bytes of the stream into Buffer. If the stream
  "does not contain Count bytes, then an exception is raised."

Also compare the short descriptions of .ReadBuffer and .WriteBuffer -
they seem to be saying the same thing. So it seems there was a
copy-and-paste error when the documentation was written.

-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net



More information about the fpc-pascal mailing list