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


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.

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.

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