We have an open [documentation:200]
<https://sourceforge.net/p/oorexx/documentation/200/> bug identifying a
quirk with CHAROUT(), which is supposed to close a file, if neither *string*
nor *start* arg is given.  But as you can see from below test case,
CHAROUT() will only close the file if it was opened in R/W mode; it will
raise NOTREADY and not close a file if it was opened as R/O.

(The equivalent .Stream methods show the same issue as above).

Is this behavior intended, and as such we should document it?
Or is this an interpreter bug?

call on notready

f = "\temp\inputfile.txt"

say "open" stream(f, "c", "open")      --> open READY:
say "charout" charout(f)               --> charout 0
say "close" stream(f, "c", "close")    --> close

say "open" stream(f, "c", "open read") --> open READY:
say "charout" charout(f)               --> charout 0
                                       --> notready raised
say "close" stream(f, "c", "close")    --> close READY:

exit

notready:
say "notready raised"
return
------------------------------------------------------------------------------
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to