### Array (x,...)

Basic syntax.

Array and MakeArray (x, ...) are equivalent functions. However, Array cannot be used in Crystal syntax since it is a keyword for declaring array variables in that syntax.

##### Arguments

The given arguments are array elements with which to initialize the array. The number of array elements can be any number between 1 and 1000. All the arguments must be of the same type. Unlike Visual Basic, you may not have 0 number of elements.

##### Returns

Array of values.

##### Action

The Array function creates an array, initializes it with the given array elements and returns it.

##### Typical use

To create and initialize an array variable in Basic syntax.

In Crystal syntax, you can use the square bracket notation for arrays instead.

##### Example

The following example is applicable to Basic syntax:

The following sets up an array of days for a week, starting with Monday:

Dim week, firstDay, lastDay
week = Array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", _
"Saturday", "Sunday")
Rem firstDay contains "Monday"
firstDay = week(1)
Rem lastDay contains "Sunday"
lastDay = week(7)
formula = firstDay

Returns "Monday".

##### Comments

This function is designed to work like the Visual Basic function of the same name.

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com