arrayref
arrayref(g_collectiong_index) =>g_element
Description
Returns the element in a collection that is in an array or a table of the given index.
This function is usually called implicitly using the [ ] syntax.
The syntax a[i] = b, referred to as the function.
Arguments
|
An integer for indexing an array. An arbitrary object for indexing a table. |
Value Returned
|
The element selected by the given index in the given collection. |
Examples
a[3]
=> 100 ;if the fourth element of the array is 100
(arrayref a 3 )
=> 100 ;same as a[3]
Related Topics
Return to top