Array Object

Top  Previous  Next

Description

The Array object contains a one-dimensional set of numbers. An Array with N elements is indexed by n = 0,1,2...N-1. The number of elements in an Array can be set when the Array is created using square brackets. The length of the Array can be changed after the Array is first created. Array elements are accessed using square brackets. See the Matrix, Array, and Variable Math Script Reference for more information. This example shows how to create an array with three elements and assign the first element a value of five:

 

Array Array1[3];

Array1[0] = 5;

 

This example shows how to create an Array and make it a 4-element array containing the values 2, 4, 6, 8:

 

Array Array2;

Array2 = {2, 4, 6, 8};

 

You can assign Array objects using the = operator.

 

Note: In millisecond mode, if the number of elements is not specified, the Array will have ten elements.

 

Inheritance Hierarchy: Object->Array

 

Available In Editions:

Engineer

Mission

 

Timing Precision Mode

This page describes functionality in nanosecond timing precision mode.

Click here to see the documentation for this object in millisecond timing precision mode.

 

Constructors

 

Properties

 

Methods

 

Static Methods

 

 

See also

Matrix, Array, and Variable Math Guide