The :element-type
argument in open
and with-open-file
defaults to the value of lw:*default-character-element-type*
.
If :element-type
is not :default
, checks are made to ensure that the resulting stream's stream-element-type
is compatible with its external format:
:input
or :io
, the argument must be a supertype of the type of characters produced by the external format. :output
or :io
, the argument must be a subtype of the type of characters accepted by the external formatIf the element-type argument doesn't satisfy these requirements, an error is signalled.
If :element-type
:default
is passed, the system chooses the stream-element-type the basis of the external format.