[]
|
Operation
|
|
Matrix or string access operation. In a matrix, can be used to access any given element, indexed by row and column position.
|
Syntax
|
Matrices: Matrix_Ident[row][column]; Strings: String_Ident[position]; or String_Ident[start_index][end_index];
|
Notes
|
For strings, the [] operation returns the character at a given position in the string (indexed from 0). []can also be used to generate a substring of a given string. Indexing starts at 0. For row or column vectors
single index will suffice, i.e. v[0][2] is the same as v[2] if v is a row vector.
|
Examples
|
test_string = "Hello cruel world";
test_substring = test_string[0][4]; // "Hello"
|
|
Last modified: 8/20/2002 |