Arbitrary Output | {R}←X ⎕ARBOUT Y |
This transmits a stream of 8-bit codes in Y to an output device specified by X.
Y may be a scalar or a simple vector of integer numbers in the range 0-255.
X is a simple numeric integer that specifies the output device.
If Y is an empty vector, no codes are sent to the output device.
The shy result R is ⍬.
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 write to the specified device.
Write ASCII digits '123' to stream 9:
9 ⎕ARBOUT 49 50 51
Write ASCII characters 'ABC' to MYFILE:
'MYFILE' ⎕NCREATE ¯1 ¯1 ⎕ARBOUT 65 66 67
Append the string 'Κάλο Πάσχα' to the same file, and close it:
¯1 ⎕ARBOUT 'UTF-8' ⎕UCS'Κάλο Πάσχα'
⎕NUNTIE ¯1