Specialized vector words
Specialized vectors

Prev:SPECIALIZED-VECTORS:
Next:Passing specialized vectors to C functions


The SPECIALIZED-VECTOR: parsing word generates the specialized vector type if it hasn't been generated already, and adds the following words to the vocabulary search path, where T is the C type in question:
T-vectorThe class of vectors with elements of type T
<T-vector>Constructor for vectors with elements of type T; stack effect ( len -- vector )
>T-vectorConverts a sequence into a specialized vector of type T; stack effect ( seq -- vector )
T-vector{Literal syntax, consists of a series of values terminated by }

Behind the scenes, these words are placed in a vocabulary named specialized-vectors.instances.T, however this vocabulary should not be placed in a USING: form directly. Instead, always use SPECIALIZED-VECTOR:. This ensures that the vocabulary can get generated the first time it is needed.