REXX I/O Functions
- CHARIN([name][, [start][,length]])--
- returns "length" characters read from the input data stream "name" (defaults to one character)
- opens the file "name" on first invocation
- maintains the "current" read position for subsequent reads from "name"
- reads from STDIN if "name" is omitted
- CHAROUT([name][, [string][,start]]) --
- returns the number of characters in "string" not written to the output datastream "name"
- "start" positions the write pointer (defaults to the current position)
- closes the file "name" when only "name" is specified
- writes to STDOUT if "name" is omitted
- CHARS([name]) --
- returns the number of characters in the input stream "name" (STDIN is assumed of "name" is omitted)
- opens the file "name" on first invocation
- LINEIN([name][,line][,count]) --
- returns "count" lines from input datastream "name" starting at the current pointer position
- "line", which must be "1" if specified, repositions the pointer to line 1
- "count" must be either "1" (indicating a read operation) or "0" (indicating no read operation)
- when a read is concluded, the read position is incremented to the next line
- LINEOUT([name][, string][, line]]) --
- returns "0" after successfully writing "string" to the output datastream "name" (if "1" is returned, indicates a write error)
- "line", which must be "1" if specified, repositions the pointer to line 1
- closes the file "name" when only "name" is specified
- LINES([name]) --
- returns "1" if any lines remain in the input datastream "name"
- opens the file "name" on first invocation
Next