>c-array ( seq c-type -- array )


Vocabulary
alien.data

Inputs
seqa sequence
c-typea C type


Outputs
arraya byte-array


Word description
Outputs a freshly allocated byte-array whose elements are C type values from the given sequence.

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.

Examples
USING: alien.c-types alien.data prettyprint ; { 1.0 2.0 3.0 } alien.c-types:float >c-array .
float-array{ 1.0 2.0 3.0 }


Definition

GENERIC: >c-array ( seq c-type -- array )


Methods