Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Object REXX
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Stream classes === Stream classes facilitate communication with external objects such as files, queues, [[Serial port|serial interfaces]], devices, etc. The <code>Stream</code> class itself is a mixin class that can be inherited and is a subclass of the <code>InputOutputStream</code>, <code>InputStream,</code> and <code>OutputStream</code> classes.<ref name=":2" /> The <code>Stream</code> class provides methods for opening, reading, writing, and closing streams and flushing buffers, setting the file location, retrieving information, and other stream-related operations. While the <code>OPEN</code> method opens the stream, the <code>ARRAYIN</code> method can be used to read its content into an array object. The <code>CLOSE</code> method explicitly closes a stream before the stream object is reclaimed by the [[Garbage collection (computer science)|garbage collector]].<ref name=":2" /><ref name=":9" /><syntaxhighlight lang="oorexx" style="background-color: #ffffff; !important" line="1"> StreamObj = .stream~new("someFile.txt") /* create stream object */ StreamObj~open /* open the stream */ FileContent = StreamObj~ArrayIn /* read content */ StreamObj~close /* close the stream */ say FileContent /* outputs content */ </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)