Rexx Reference manual suggestion:
less run-around in documentation of I/O errors.
In 220.127.116.11. open,
it says "Opens the tream and returns READY:. If the method is
unsuccessful, it returns an error message string in the same form
that the description method uses. For most error conditions, the
additional information is in the form of a numeric return code. This
return code is the value of ERRNO, which is set whenever one of the
file system primitives returns with a -1."
Note: "description" is not a link.
In 18.104.22.168. description,
it says "Returns any descriptive string associated with the current
state of the stream or the Nil object if no descriptive string is
available. The description method is identical with the STATE method
except that the string that description returns is followed by a
colon and, if available, additional information about ERROR or
Note: "STATE" is not a link.
In 22.214.171.124. state,
It says "Returns a string indicating the current stream state. The
returned strings are as follows:
The tream has been subject ot an erroneous operation (possibly during
input, output, or through the STREAM function). See Errors during
Input and Output. ..."
"Errors during Input and Output" is a link to 14.5. Errors during
Input and Output.
14.5. Errors during Input and Output,
Refers the reader back to STATE and DESCRIPTION methods for further
Refers the user to Chapter 14 Input and Output Streams, and to
126.96.36.199. state, for further info.
Thus, the doc. for error conditions is rather serpentine.
I suggest that someplace should document the exact format of returned
values for I/O methods, with examples. Good places to put that might
be 14.4. Examples of Input and Output (by enhancing the existing
examples), or 14.5. Errors during Input and Output.
Something on the order of:
afile = .stream~new('my.file.that.exists')
/ says "READY:" /
/ says "READY" (no trailing colon) /
/ says "READY:" /
. . .
bfile = .stream~new('non.existant.file')
/ says "ERROR:2" on Linux ???????? on Windows /
/ says "ERROR"
/ says "ERROR:2 No such file or directory" on Linux
and ??????? on Windows */
Note: the result of creating the above Linux example somewhat
surprised me. Based on the descriptions of 188.8.131.52. open and
184.108.40.206. description, I did not expect to see any difference between
the return value for open() and that for description().
Another possibility might be to add an I/O error section to Appendix
C. Error Numbers and Messages.
Also, it would be very helpful if the documentation suggested how the
reader could look up ERRNO values for their platform (since 220.127.116.11.
open, specifically mentions ERRNO).