This transmits a stream of 8-bit codes in Y to an output device specified by X prior to reading from an input device specified by X.
Y may be a scalar or a simple vector of integer numbers in the range 0-255.
X may take several forms:
terminate (input output) | ⎕ARBIN | codes |
terminate input | ⎕ARBIN | codes |
This is a numeric scalar or vector that specifies how the read operation should be terminated.
This is a simple numeric scalar that specifies the input device.
If specified, this is a simple numeric integer that identifies the output device.
The result R is a simple numeric vector. Each item of R is the numeric representation of an 8-bit code in the range 0 to 255 received from the input device. The meaning of the code is dependent on the characteristics of the input device. If a set of delimiters was defined by terminate, the last code returned will belong to that set.
⎕RTL (Response Time Limit) is an implicit argument of ⎕ARBIN. This allows a time limit to be imposed on input. If the time limit is reached, ⎕ARBIN returns with the codes read up to that point. This does not apply under Windows.
The operation will fail with a DOMAIN ERROR if Y contains anything other than numbers in the range 0-255, or if the current process does not have permission to read from or write to the specified device(s).
)sh mkfifo ./fifo
in←'./fifo'⎕NTIE 0 out←'./fifo'⎕NTIE 0
(10 (in out))⎕ARBIN ⎕UCS ⎕D 48 49 50 51 52 53 54 55 56 57
(⍬ (in out))⎕ARBIN 10 10
⍝ cope with parity on line ending 10 ((10+0 128) (in out))⎕ARBIN 10 10