Vorige: Functions and Variables for plain-text input and output, Nach oben: numericalio [Inhalt][Index]
Tells numericalio
the byte order for reading and writing binary data.
Two values of byte_order_flag are recognized:
lsb
which indicates least-significant byte first, also called little-endian byte order;
and msb
which indicates most-significant byte first, also called big-endian byte order.
If not specified, numericalio
assumes the external byte order is most-significant byte first.
Returns an input stream of 8-bit unsigned bytes to read the file named by file_name.
Returns an output stream of 8-bit unsigned bytes to write the file named by file_name.
Returns an output stream of 8-bit unsigned bytes to append the file named by file_name.
Reads binary 8-byte floating point numbers from the source S into the matrix M until M is full, or the source is exhausted. Elements of M are read in row-major order.
The source S may be a file name or a stream.
The byte order in elements of the source is specified by assume_external_byte_order
.
Reads binary 8-byte floating point numbers from the source S into the array A
until A is full, or the source is exhausted.
A must be an array created by array
or make_array
.
Elements of A are read in row-major order.
The source S may be a file name or a stream.
The byte order in elements of the source is specified by assume_external_byte_order
.
read_binary_list(S)
reads the entire content of the source S
as a sequence of binary 8-byte floating point numbers, and returns it as a list.
The source S may be a file name or a stream.
read_binary_list(S, L)
reads 8-byte binary floating point numbers
from the source S until the list L is full, or the source is exhausted.
The byte order in elements of the source is specified by assume_external_byte_order
.
Writes the object X, comprising binary 8-byte IEEE 754 floating-point numbers,
to the destination D.
Other kinds of numbers are coerced to 8-byte floats.
write_binary_data
cannot write non-numeric data.
The object X may be a list, a nested list, a matrix,
or an array created by array
or make_array
;
X cannot be an undeclared array or any other type of object.
write_binary_data
writes nested lists, matrices, and arrays in row-major order.
The destination D may be a file name or a stream.
When the destination is a file name,
the global variable file_output_append
governs
whether the output file is appended or truncated.
When the destination is a stream,
no special action is taken by write_binary_data
after all the data are written;
in particular, the stream remains open.
The byte order in elements of the destination
is specified by assume_external_byte_order
.
Vorige: Functions and Variables for plain-text input and output, Nach oben: numericalio [Inhalt][Index]