Usage
a::BinaryReader
a::BinaryWriter
Signatures
coerce: % BinaryReader coerce: % BinaryWriter
Parameter | Type | Description |
---|---|---|
a | % | a primitive memory block |
Description
a::T where T is an I/O stream type converts the block s to a binary reader or writer, allowing one to read data or write data to it.
Remarks
When writing to a memory block, you must ensure that the block is large enough for all the data that will be written to it, since the block will not be extended and this function does not protect you against overwriting. When reading from or writing to a memory block, each coercion to a reader or writer resets the stream to the beginning of the block, and the block is not side-affected by the subsequent read or write operations, while the stream is side-affected. Thus, when reading several values from the same block, you must assign the reader to a variable and read the values from that variable.
See Also
coerce.