<c-array> ( len c-type -- array )


Vocabulary
alien.data

Inputs and outputs
lena non-negative integer
c-typea C type
arraya byte-array


Word description
Creates a byte array large enough to hold n values of a C type.

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 ; 10 void* <c-array> .
void*-array{ f f f f f f f f f f }


See also
<c-direct-array>, malloc-array

Definition

GENERIC: <c-array> ( len c-type -- array )


Methods