cast-array ( byte-array c-type -- array )


Vocabulary
alien.data

Inputs and outputs
byte-arraya byte-array
c-typea C type
arraya specialized array


Word description
Converts a byte array into a specialized array by interpreting the bytes in as machine-specific values. Code which uses this word is unportable.

Notes
The appropriate specialized array vocabulary must be loaded; otherwise, an error will be thrown. See the specialized-arrays vocabulary for details on the underlying sequence type constructed.

Errors
Throws an error if the type does not exist, the necessary specialized array vocabulary is not loaded, or the requested size is negative.

Definition