VECTOR() Function - Convert Array to Vector

Syntax

VECTOR(arrayname{,ERR=lineref})

Description

In BBj 16.0 and higher, the VECTOR() function returns a BBjVector containing the array elements from the specified array.

Example

n = 10
dim array[10]
for i = 0 to n; array[i] = n; next i
vector! = vector(array[])
print vector!
dim array%[10]
for i = 0 to n; array%[i] = n; next i
vector! = vector(array%[])
print vector!
dim array$[10]
for i = 0 to n; array$[i] = str(n); next i
vector! = vector(array$[])
print vector!
dim array![10]
for i = 0 to n; array![i] = str(n); next i
vector! = vector(array![])
print vector!

See Also

BBjVector

Functions - Alphabetical Listing