src/swipl-devel/packages/xpce/man/refmanual/md/vector.md

class vector {#class-vector}

A vector is a one-dimensional array. Vectors act as dynamic arrays: values can be stored at any index. The initial arguments are stored from index 1.

The amount of memory used to store a vector is determined by the difference between the lowest index and the highest index. In many applications, sparse arrays are better realised using class hash_table.

@see class chain @see class table

Instance variables {#class-vector-instvars}

Send methods {#class-vector-send}

Get methods {#class-vector-get}



Try the rswipl package in your browser

Any scripts or data that you put into this service are public.

rswipl documentation built on June 16, 2026, 5:07 p.m.