Share via


Small Basic Reference Documentation: Array Object

Small Basic: Reference Documentation > Array
   

http://smallbasic.com/img/object_32.png

Array

This object provides a way of storing more than one value for a given name. These values can be accessed by another index.

Operations

http://smallbasic.com/img/method_16.png ContainsIndex

Array.ContainsIndex(array, index)

Gets whether or not the array contains the specified index. This is very useful when deciding if the array's index was initialized by some value or not.

array

The array to check.

index

The index to check.

Returns

"True" or "False" depending on if the index was present in the specified. array.

http://smallbasic.com/img/method_16.png ContainsValue

Array.ContainsValue(array, value)

Gets whether or not the array contains the specified value. This is very useful when deciding if the array's value was stored in some index.

array

The array to check.

value

The value to check.

Returns

"True" or "False" depending on if the value was present in the specified. array.

http://smallbasic.com/img/method_16.png GetAllIndices

Array.GetAllIndices(array)

Gets all the indices for the array, as another array.

array

The array whose indices are requested.

Returns

An array filled with all the indices of the specified array. The index of the returned array starts from 1.

http://smallbasic.com/img/method_16.png GetItemCount

Array.GetItemCount(array)

Gets the number of items stored in the array.

array

The array for which the count is requested.

Returns

The number of items in the specified array.

http://smallbasic.com/img/method_16.png IsArray

Array.IsArray(array)

Gets whether or not a given variable is an array.

array

The variable to check.

Returns

"True" if the specified variable is an array. "False" otherwise.

See Also

Other Languages