Sets the size of a term vector.
tv_setsize/2 sets the size of the term vector Vector to Size. Size has to be a non negative integer. With tv_setsize/2 you may expand or shrink the size of a term vector. If you shrink its size all elements with an index greater than Size will be lost (even if you set the size back to the previous vector size). If you expand the vector then all elements with an index greater than the previous vector size will be set to 'null'.
Vector object (term vector) Size integer
tv_create(V),
tv_add(V, one),
tv_add(V, two),
tv_add(V, three),
tv_list(V, L1),
tv_setsize(V, 2),
tv_list(V, L2),
tv_setsize(V, 4),
tv_list(V, L3)
->
L1 = [one,two,three]
L2 = [one,two]
L3 = [one,two,null,null]
This predicate is not part of the ISO-Prolog Standard.