Improper lists in list_to_binary/1

Bjorn Gustavsson <>
Tue Oct 26 11:34:49 CEST 2004


I see that our documentation is slightly incomplete.

Several BIFs accept what we call I/O lists. I/O lists are
mentioned but not completely defined in the documentation for
port_command/2 (in the erlang man page). I/O lists have been
supported for a long time (maybe even in OTP R1B).

An I/O list is a deep list of binaries and integers in the range
0 through 255 and binaries. Furthermore, a binary is allowed
in the tail position of a cons cell. (An integer is NOT allowed
in the tail position.)

Some of the BIFs that accept I/O lists are:

list_to_binary/1
port_command/2
port_control/3

We will clarify the documentation in a future release.

/Bjorn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list