Revision history for KeyPgOpArrayIndex


Revision [21000]

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


Revision [20350]

Edited on 2016-02-10 16:03:36 by DkLwikki [Update link format]
Additions:
[[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]
Additions:
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]
Additions:
[[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]
Additions:
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]
Additions:
~&//Note that **##Operator ()## (Array index)** returns a reference. See [[CompilerFAQ Compiler FAQ]].//
Deletions:
~&//Note that **##Operator ()## (Array index)** returns a reference. As of 02.27.07, ""FreeBASIC"" syntax does not support returning references. When it does, this syntax will need to be changed.//


Revision [13488]

The oldest known version of this page was created on 2008-07-11 06:29:47 by DoS386 [updated note about reference returns]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode