raise a bug report against the documentation.
Quoteraise a bug report against the documentation.
How do I do that?
raise a bug report against the documentation.
The general consensus regarding examples in the documentation seems that they do not have to make sense nor actually have to work. They are present to show how a certain function could be used.
Kind of a strange attitude, especially towards beginners who rely on example code.
Why bother with examples in documentation at all if you can't rely on them.
However, I got an interesting reply:I cannot believe that this was written by a team member (maybe be a frustrated user?). Can you post the link to your bug report?QuoteThe general consensus regarding examples in the documentation seems that they do not have to make sense nor actually have to work. They are present to show how a certain function could be used.
Kind of a strange attitude, especially towards beginners who rely on example code.
I cannot believe that this was written by a team member (maybe be a frustrated user?). Can you post the link to your bug report?
This example does not compileCompiles just fine.
Is the sample wrong or do I miss something? Why does the sample for fpaccept use Accept?The part that is missing (or actually added/set by your used configuration) is ansistring.
Yes, good idea, let us make all examples work for all compiler modes/settings
What compiler mode did you use for your working compile?See example, it is explicitly set (for a reason as a compiler mode has further implications).
QuoteYes, good idea, let us make all examples work for all compiler modes/settings
What compiler mode did you use for your working compile?
I'm not aware of having changed that afterninstall but who knows...
The FP functions were introduced in 2.0 (and the 1.9.x betas before it) to sanitize the 1.0.x situation which had an own error handling convention that
- Always updated an error value
- returned true or false for errors
and were non-standard in many ways. One of the problems was that some calls were implemented on some unices with multiple syscalls, and when switching the RTL from syscalls to libc. Some of the reasons are named in http://www.stack.nl/~marcov/unixrtl.pdf
So the new FP functions were introduced to remedy that and got a prefix because posix names are very general, and some are equal to FPC keywords like read and write.
Other core members wanted to hold on to the functions for compatibility for a while. The oldlinux unit was finally removed in 3.0.x, and the Linux stat record being an union with 1.0.x era field names was also finally erased by afaik Sven for 3.2.x or so.
Some functions like the socket to file descriptor stuff are a grey area too. Afaik the original implementors maintained that they are fine, but bugreports about them (and especially about errorhandling) linger forever. Probably they are fine for simplistic scripting use, but not to base applications on?
Some of the reasons are named in http://www.stack.nl/~marcov/unixrtl.pdfWow, interesting read. And insight to the inner working of the team.....