Indexed Names - Maple Programming Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Data Types : Tables, lists, and sets : indexed

Indexed Names


Calling Sequence


Calling Sequence

name[expression sequence]



An indexed expression of the form name[expression sequence] represents a selection operation.


An indexed name is a valid name.  In particular, since A[1,2,3] is a valid name, so are A[1,2,3][x,y] and A[1,2,3][x,y][2,1].


The use of the indexed name b[1] does not imply that b is an array.  For instance, if b is an unassigned name, a := b[1] + b[2] + b[1000] simply forms a sum of three indexed names.


If an assignment is made to name, then name[expression sequence] represents a selection from name using the index sequence expression sequence.  For more information, see selection.


The assignment of a value to an indexed name implicitly creates a table. Thus the statement b[1] := 10 creates a table for b and assigns the value 10 to the component of the table indexed by 1.


Note: In the Standard worksheet, the output for an indexed name is displayed using a subscripted expression.  For instance,




You can enter an indexed name using subscript notation (b1) from the Expression palette or by using the shortcut key for indexed subscripts (2-D Math Shortcut Keys and Hints).


The op function applied to an indexed name yields the expression sequence of indices appearing within the rightmost brackets, and the zeroth operand is the corresponding name.

See Also