GetElement
GetElement(access expression)
Parameter: an access printout
Stack | Position | Description |
---|---|---|
Stack(In) | Top | one object |
Top 1 | k | |
Stack(Out) | Top | the k-th element of a collection |
brings the kth element of the collection reached via an access expression to the stack. The access expression must be specified as a parameter. Again k=0 corresponds to the first element.
GetElement
Stack | Position | Description |
---|---|---|
Stack(In) | Top | a collection |
Top 1 | k | |
Stack(Out) | Top | the k-th element of a collection |
brings the k-th element of the collection to the stack.
GetElement
Stack | Position | Description |
---|---|---|
Stack(In) | Top | a vector |
Top 1 | k | |
Stack(Out) | Top | the k-th element of a vector |
brings the k-th element of the vector onto the stack.
GetElement
Stack | Position | Description |
---|---|---|
Stack(In) | Top | an MLString |
Top 1 | k | |
Stack(Out) | Top | the kth element of an MLString |
brings the kth element of the MLString onto the stack. k = 0 corresponds to the first given string (see code example).
Code example:
0 [ 1€ 2€ 3€ ] GetElement // => 1€ 5 [ 1€ 2€ 3€ ] GetElement // => NULL 2 T("A", "B", "C") GetElement // => "C" 3 T("A", "B", "C") GetElement // => NULL
Note: If you have a collection, vector or MLString with less than k elements you will get NULL.