[Next] [Up] [Previous] [Contents]
Next: The concatenation operator Up: SMV language overview Previous: Comprehension expressions

Vectors and vector operators

A vector is a fixed-length string of values. It differs from an array in several respects:

A vector x of n elements is denoted by a non-empty, comma-separated list of elements within square brackets:

        [xn, ..., x1, x0]

The nth element can be extracted from a vector by the function nth, which takes a vector as its first argument, and an integer as its second argument. The function nth numbers the elements of the vector from zero on the right. So, for example,

        nth([5,4,3,2,1,0], 2) = 2





Ken McMillan
Sat Jun 6 21:41:59 PDT 1998