System.Array

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
namespace System
public sealed class Array

The Array class is equivalent to [#,#]@class. (See [#,#]@class for more information.) An instance of this class will only be created via the Synergy array syntax. It represents a 1‑based array or, on .NET, a 0‑based array with .ARRAY 0 declared. (See .ARRAY.) All of the method parameters or return values below that specify an index or dimension are 1‑based unless .ARRAY 0 is specified, in which case they are 0‑based. See "Variable references" in the Basic language elements topic for more information about array references.

Properties

Array.Length

public Length

Returns the total number of elements in all dimensions of the array. (int)

Array.Rank

public Rank

Returns the number of dimensions in the array. (int)

Methods

Array.Clear

public static Clear(array, startindex, count), void

Sets elements in an array to 0, false, or null depending on the element type. When clearing a real array, the array behaves like one pseudo array whose rows are laid end to end. For example, a starting index of 6 in a [5,5] array will start clearing from index [2,1].

array

The array whose elements are to be cleared. (@Array)

startindex

The starting index of the range of elements to clear. (int)

count

The number of elements to clear. (int)

Array.Copy

public static Copy(source, sourceindex, dest, destindex, count), void

Copies a range of elements in one array to another array. When copying between real arrays, each array behaves like one pseudo array whose rows are laid end to end. For example, a starting index of 6 in a [5,5] array will start copying from index [2,1].

source

The array containing the data to copy. (@Array)

sourceindex

The index in source at which copying begins. (int)

dest

The array that receives the copied data. (@Array)

destindex

The index in dest at which storing begins. (int)

count

The number of elements to copy. (int)

Array.GetLength

public GetLength(dimension), int

Returns the length of the specified dimension (int).

Array.GetValue

public GetValue(index), @*

Returns the value at the specified position in a single‑dimension array (int).

Array.IndexOf

public static IndexOf(array, value, startindex, count), int

Returns the first 1‑based index position of the specified object in a single‑dimension array. This method determines equality by calling the Equals() method of the Array element type.

array

The single‑dimension array to search. (@Array)

value

The object to search for. (@*)

startindex

The index at which the search begins. (int)

count

The number of elements to search. (int)

Array.LastIndexOf

public static LastIndexOf(array, value, startindex, count), int

Returns the 1‑based index of the last occurrence of the specified object in a single‑dimension array. This method determines equality by calling the Equals() method of the Array element type.

array

The single‑dimension array to search. (@Array)

value

The object to search for. (@*)

startindex

The index at which the reverse search begins. (int)

count

The number of elements to search. (int)

Array.SetValue

public SetValue(value, index), void

Sets the value (@*) at the specified array index (int) in a single‑dimension array.