## Arrays

There are 2 arrays defined in iziBasic: A() and A$().
At runtime, both can address all Numbers and text Strings stacks.

A-Z variables are also addressed with A(1)-A(26)
A$-Z$ variables are also addressed with A$(1)-A$(26)
This means, for instance, that A$(2) and B$ are the same thing, A(4) and D are also the same.

DIM A(n)
DIM A$(n)

At design time, DIM A[$](n) reserves some space in the Numbers/Text stack in addition to the A-Z/A$-Z$ variables

Notes:

- n>26 and n<=FRE(4). You will have to leave some space in the upper stack for all other numerical/text assignments
- DIM A[$](n) must be defined before the iziBasic compiler reserves some space in the Numbers/Text stack for its use, so you should place your DIM A[$](n) at the top of your program, just after the Compiling Directives

CONST A(n)=n

Define A(n) as a numerical constant.

CONST A$(n)=t

Define A$(n) as a text string constant.

Notes:

- Doing A(123)=123 will reserve 1 extra space in the Number stack, when CONST A(123)=123 will only require no extra space but A(123) which is always reserved.
- Doing A$(123)="Some text" will reserve 1 extra space in the Text stack, when CONST A$(123)="Some text" will only require no extra space but A$(123) which is always reserved.

[LET] A(v|n)=v|n|f [MathOper v|n|f] [...]
[LET] A$(v|n)=c|t|s [+ c|t|s] [...]

LET assigns the value of the expression after the "=" sign to the variable. iziBasic supports implied LET statements, meaning that the LET statement is optional.

Notes:

- s can also be a A$(v|n)
- f can also be a A(v|n)
- please see the PARSER compiling directive

MAX A(v|n1, v|n2)

Returns the highest value of array between the v|n1 index and the v|n2 one

MEAN A(v|n1, v|n2)

Returns the average value of array between the v|n1 index and the v|n2 one

MIN A(v|n1, v|n2)

Returns the smallest value of array between the v|n1 index and the v|n2 one

RSORT A, v|n1, v|n2

Reverse sorts array by values from the v|n1 index to the v|n2 one.

RSORT A$, v|n1, v|n2

Alphabetical reverse sort of array from the v|n1 index to the v|n2 one. The sort is case sensitive

SORT A, v|n1, v|n2

Sorts array by values from the v|n1 index to the v|n2 one.

SORT A$, v|n1, v|n2

Alphabetical sort of array from the v|n1 index to the v|n2 one. The sort is case sensitive

SUM A(v|n1, v|n2)

Returns the sum of all values of array between the v|n1 index and the v|n2 one