READ-BYTE
,
EXT:READ-INTEGER
& EXT:READ-FLOAT
The function (
reads a multi-byte EXT:READ-INTEGER
stream
element-type
&OPTIONAL
ENDIANNESS
eof-error-p
eof-value
)INTEGER
from stream
, which should be a
STREAM
with STREAM-ELEMENT-TYPE
(
.
UNSIGNED-BYTE
8)element-type
should be type equivalent to (
,
where UNSIGNED-BYTE
n
)n
is a multiple of 8.
(
is like
EXT:READ-INTEGER
stream
element-type
)(
if READ-BYTE
stream
)stream
's
STREAM-ELEMENT-TYPE
were set to element-type
,
except that stream
's FILE-POSITION
will increase by
n
/8
instead of 1.
Together with (
, this
function permits mixed character/binary input from a stream.SETF
STREAM-ELEMENT-TYPE
)
The function (
reads a
floating-point number in IEEE 754 binary representation from
EXT:READ-FLOAT
stream
element-type
&OPTIONAL
ENDIANNESS
eof-error-p
eof-value
)stream
, which should be a STREAM
with
STREAM-ELEMENT-TYPE
(
. UNSIGNED-BYTE
8)element-type
should be
type equivalent to SINGLE-FLOAT
or DOUBLE-FLOAT
.
Endianness. ENDIANNESS
can be :LITTLE
or :BIG
.
The default is :LITTLE
, which corresponds
to the READ-BYTE
behavior in CLISP.
WRITE-BYTE
,
EXT:WRITE-INTEGER
& EXT:WRITE-FLOAT
The function (
writes a multi-byte EXT:WRITE-INTEGER
integer
stream
element-type
&OPTIONAL
ENDIANNESS
)INTEGER
to
stream
, which should be a STREAM
with
STREAM-ELEMENT-TYPE
(
. UNSIGNED-BYTE
8)element-type
should be
type equivalent to (
, where UNSIGNED-BYTE
n
)n
is a multiple of 8.
(
is
like EXT:WRITE-INTEGER
integer
stream
element-type
)(
if WRITE-BYTE
integer
stream
)stream
's
STREAM-ELEMENT-TYPE
were set to element-type
, except that stream
's
FILE-POSITION
will increase by
n
/8
instead of 1.
Together with (
, this
function permits mixed character/binary output to a SETF
STREAM-ELEMENT-TYPE
)STREAM
.
The function (
writes a
floating-point number in IEEE 754 binary representation to
EXT:WRITE-FLOAT
float
stream
element-type
&OPTIONAL
ENDIANNESS
)stream
, which should be a STREAM
with STREAM-ELEMENT-TYPE
(
. UNSIGNED-BYTE
8)element-type
should be
type equivalent to SINGLE-FLOAT
or DOUBLE-FLOAT
.
These notes document CLISP version 2.49.93+ | Last modified: 2018-02-19 |