### Revision history for KeyPgOpArrayIndex

#### Revision [21000]

Last edited on 2016-03-13 05:06:03 by fxm [Formatting]

#### Revision [20350]

Edited on 2016-02-10 16:03:36 by DkLwikki [Update link format]
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **()** ( //lhs//() [[KeyPgAs|as]] //T//, [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] [[KeyPgInteger|integer]], ... ) [[KeyPgByrefFunction|byref]] [[KeyPgAs|as]] //T//
For any dimension ##//d//## in array ##//a//##, any index less than ##[[KeyPgLbound|Lbound]](//a//, //d//)## or greater than ##[[KeyPgUbound|Ubound]](//a//, //d//)## will result in a runtime error.
##### Deletions:
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **()** ( //lhs//() [[KeyPgAs as]] //T//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]], ... ) [[KeyPgByrefFunction byref]] [[KeyPgAs as]] //T//
For any dimension ##//d//## in array ##//a//##, any index less than ##[[KeyPgLbound Lbound]](//a//, //d//)## or greater than ##[[KeyPgUbound Ubound]](//a//, //d//)## will result in a runtime error.

#### Revision [16585]

Edited on 2013-02-04 01:02:08 by CountingPine [Explicit lower array bound in example]
dim array(0 to 4) as integer = { 0, 1, 2, 3, 4 }
##### Deletions:
dim array(4) as integer = { 0, 1, 2, 3, 4 }

#### Revision [16583]

Edited on 2013-02-04 01:00:04 by CountingPine [Closer syntax; minor example correction; Link to Operator [] (needs an fbdoc-type link because of th]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **()** ( //lhs//() [[KeyPgAs as]] //T//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]], ... ) [[KeyPgByrefFunction byref]] [[KeyPgAs as]] //T//
print array(index);
print
0 1 2 3 4
- ##{{fbdoc item="keyword" value="KeyPgOpPtrIndex|Operator [] (Pointer index)"}}##
##### Deletions:
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **()** ( //lhs//() [[KeyPgAs as]] //T//, [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]], ... ) [[KeyPgAs as]] //T//
~&//Note that **##Operator ()## (Array index)** returns a reference. See [[CompilerFAQ Compiler FAQ]].//
print array(index)
0 1 2 3 4

#### Revision [15887]

Edited on 2012-01-29 21:35:50 by CountingPine [Reword, fix *bound syntax]
For any dimension ##//d//## in array ##//a//##, any index less than ##[[KeyPgLbound Lbound]](//a//, //d//)## or greater than ##[[KeyPgUbound Ubound]](//a//, //d//)## will result in a runtime error.
##### Deletions:
For any one dimension //d// in array //a//, any index outside of the range (##[[KeyPgLbound Lbound]](//a//(), //d//), [[KeyPgUbound Ubound]](//a//(), //d//)##) will result in a runtime error.

#### Revision [14147]

Edited on 2009-05-28 19:44:57 by LaananFisher [updated note about reference returns]