Navigation:  ThinBASIC Modules > Core (thinBasic Core Engine) > Array functions >

ARRAY ASSIGN

Previous pageReturn to chapter overviewNext page

 

Description

 

Allow the assignment of a number of values to successive elements of an array.

 

Syntax

 

ARRAY ASSIGN ArrayVariable([StartIndex]) = Expression1 [, Expression2 [, ...] ]

ARRAY ASSIGN ArrayVariable(-1) = Expression

 

Returns

 

None

 

Parameters

 

Name

Type

Optional

Meaning

ArrayVariable


No

Name of a declared and already dimensioned array.

StartIndex

Number

Yes

The element index inside the array from which to start assignment.

 

Remarks

 

If StartIndex is omitted or 0 (zero), 1 is assumed.

If StartIndex is -1, all array elements will be filled with Expression value.

 

Restrictions

 

See also

 

LBound, UBound, ARRAY SORT,

 

Examples