IF Computer > MINERVA > Manual > Reference > Predicates > Term vector > tv_add/2

tv_add/2

MINERVA
ifcomputer logo
f
Expert Services on the Web

Appends a term to a term vector.

tv_add(+Vector, +Term)

tv_add/2 expands the size of the vector Vector by one element and sets the last element of the expanded vector to Term.

Arguments

Vector                  object (term vector)
Index                   integer
Term                    term

Examples

    tv_create(V),
    tv_size(V, InitialSize),
    tv_add(V, one),
    tv_add(V, two),
    tv_size(V, FinalSize),
    tv_list(V, L).
->
    InitialSize = 0
    FinalSize = 2
    L = [one,two]

Standard

This predicate is not part of the ISO-Prolog Standard.

See also

tv_create/1, tv_add/2, tv_size/2, tv_setsize/2, tv_set/3, tv_get/3, tv_list/2.

document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/termvector/tv_add/print_en.html
published 2008/10/13 update 2002/3/19 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
Back> managed with ubiCMS