GET

Member Of Menu: 
List
Array
Argument Types: 
Real
List
Symbol
Array
Result Type(s): 
Any
Real
Complex
Invertible: 
No
Valid In Expression: 
No
Stack Diagram: 
List1 Real2 Item3
List1 List2 Item3
Array1 Real2 Item3
Array1 List2 Item3
Symbol1 Real2 Item3
Symbol1 List2 Item3

This operation is used to retrieve an item at a particular index within a list. The list to retrieve from may be found on the stack or it may be a list found in memory, referenced by a symbol name. In either case, the item at the real number index is retrieved and pushed onto the stack. If the index is a list and that list contains only one real value, then that real value is used as an index into the source to retrieve a value.

The operation also operates on vectors a matrices. If the item being operated on is a vector, either on the stack or referenced through a symbol, then the index can be a real value or a list with a single real value. The real or complex value at that location in the vector is pushed as the result. If the item being operated on is a matrix, then the index must be a list with two real values which represent the row and column of the item to retrieve. Again, the result will be a real or complex value.

The operation will produce an error if the index is outside the range of the list, vector or matrix.