Revision history for KeyPgOpStringIndex


Revision [21062]

Last edited on 2016-03-13 08:39:49 by fxm [Formatting]

No Differences

Revision [20414]

Edited on 2016-02-10 16:05:38 by DkLwikki [Update link format]
Additions:
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **[]** ( [[KeyPgByref|byref]] //lhs// [[KeyPgAs|as]] [[KeyPgString|string]], [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] [[KeyPgInteger|integer]] ) [[KeyPgByrefFunction|byref]] [[KeyPgAs|as]] [[KeyPgUbyte|ubyte]]
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **[]** ( [[KeyPgByref|byref]] //lhs// [[KeyPgAs|as]] [[KeyPgZstring|zstring]], [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] [[KeyPgInteger|integer]] ) [[KeyPgByrefFunction|byref]] [[KeyPgAs|as]] [[KeyPgUbyte|ubyte]]
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **[]** ( [[KeyPgByref|byref]] //lhs// [[KeyPgAs|as]] [[KeyPgWstring|wstring]], [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] [[KeyPgInteger|integer]] ) [[KeyPgByrefFunction|byref]] [[KeyPgAs|as]] //T//
- Otherwise, the user must ensure that the index does not exceed the range "[0, ##[[KeyPgLen|Len]](//lhs//) - 1##]". Outside this range, results are undefined.
- [[CatPgOpString|String Operators]]
Deletions:
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgString string]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgByrefFunction byref]] [[KeyPgAs as]] [[KeyPgUbyte ubyte]]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgZstring zstring]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgByrefFunction byref]] [[KeyPgAs as]] [[KeyPgUbyte ubyte]]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgWstring wstring]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgByrefFunction byref]] [[KeyPgAs as]] //T//
- Otherwise, the user must ensure that the index does not exceed the range "[0, ##[[KeyPgLen Len]](//lhs//) - 1##]". Outside this range, results are undefined.
- [[CatPgOpString String Operators]]


Revision [16806]

Edited on 2013-05-10 14:23:58 by FxMwikki [Precised the string kind valid for operator [] (string index)]
Additions:
The string (a string reference, not a string returned as local copy).
Deletions:
The string.


Revision [16587]

Edited on 2013-02-04 22:05:28 by CountingPine [Byref returns; make example slightly more interesting]
Additions:
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgString string]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgByrefFunction byref]] [[KeyPgAs as]] [[KeyPgUbyte ubyte]]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgZstring zstring]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgByrefFunction byref]] [[KeyPgAs as]] [[KeyPgUbyte ubyte]]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgWstring wstring]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgByrefFunction byref]] [[KeyPgAs as]] //T//
print chr(a[i]) & " ";
H e l l o , w o r l d !
Deletions:
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgString string]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgUbyte ubyte]]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgZstring zstring]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgUbyte ubyte]]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **[]** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgWstring wstring]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] //T//
~&//Note that **##Operator {}## (String index)** returns a reference. See [CompilerFAQ Compiler FAQ]].//
print chr(a[i]);
Hello, world!


Revision [15011]

Edited on 2010-12-18 15:35:19 by FxMwikki [Byref returns; make example slightly more interesting]
Additions:
- This operator must not be used in case of empty string because reference is undefined (inducing runtime error).
Deletions:
- This operator must not be used in case of an empty string because reference is undefined (inducing runtime error).


Revision [15010]

Edited on 2010-12-18 06:52:26 by FxMwikki [Byref returns; make example slightly more interesting]
Additions:
This operator returns a reference to a specific character in a string:
- This operator must not be used in case of an empty string because reference is undefined (inducing runtime error).
- Otherwise, the user must ensure that the index does not exceed the range "[0, ##[[KeyPgLen Len]](//lhs//) - 1##]". Outside this range, results are undefined.
Deletions:
This operator returns a reference to a specific character in a string.
The user must ensure that the index does not exceed the range "[0, ##[[KeyPgLen Len]](//lhs//) - 1##]". Outside this range, results are undefined.


Revision [14403]

Edited on 2009-08-29 21:55:47 by CountingPine [Remove CamelCase links in "New to FreeBASIC"]
Additions:
- New to ""FreeBASIC""
Deletions:
- New to FreeBASIC


Revision [14148]

Edited on 2009-05-28 19:45:25 by LaananFisher [updated note about reference returns]
Additions:
~&//Note that **##Operator {}## (String index)** returns a reference. See [CompilerFAQ Compiler FAQ]].//
Deletions:
~&//Note that **##Operator {}## (String index)** returns a reference. As of Feb 27 2007, ""FreeBASIC"" syntax does not support returning references. When it does, this syntax will need to be changed.//


Revision [13487]

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



sf.net phatcode