Next: , Up: syslib vectors   [Index]


12.16.1 Vector constructors

The arguments vec to these operations must be fixnums, the arguments fx must be fixnums. The following bindings are exported by the library (vicare system $vectors).

Unsafe Operation: $make-vector fx

Allocate and return a new vector value of fx elements.

NOTE This operation does not initialise the data area, leaving the items set to whatever is on the Scheme heap; this is bad for garbage collection if the newly built vector is moved before the items are initialised to correct Scheme values. We should use the $make-clean-vector function.

Unsafe Operation: $make-clean-vector fx

Allocate and return a new vector value of fx elements; initialise all the slots to the fixnum zero.

Unsafe Operation: $subvector src.vec src.start src.end

Return a new vector holding items from src.vec from src.start inclusive to src.end exclusive.