reads all binary data from a file
file descriptor or filename
(optional) one or more of the options described below
The type to assign to the data read, one of the following:
integer, integer, integer, integer, float, float. These types represent hardware data types. The integer[n] is an n byte integer, and float[n] is an n byte float. If datatype is not specified, it defaults to integer.
Specify the byte order b in which bytes are read for multi-byte data types, where b is one of the names big, little, network, and native.
- big and little specify big endian and little endian, respectively
- network specifies the network ordering (big endian)
- native uses the native byte ordering
If byteorder is not specified, then it defaults to network.
If file is the name of a file that has not previously been opened, ReadFile attempts to open the file before reading the data. In this case, ReadFile will also close the file after reading.
An error is raised if file is not a valid descriptor or if it is the name of a file that does not exist.
The ReadFile(file) command reads all the data in datatype format from a file and returns it in the form of an Array.
ReadFile will issue a warning message when the requested datatype is multi-byte and there is some extra data remaining at the end of the file.
num ≔ 1⁢2563+2⁢2562+3⋅256+4
num2 ≔ 4⁢2563+3⁢2562+2⋅256+1
The FileTools[Binary][ReadFile] command was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
Download Help Document