H (Hybrid) Language - v0.03, by Dr. Herong Yang
array.subArray() - Sub-Array Function
This section describes Sub-Array Function - array.subArray()
The array.subArray() function is defined in the following syntax:
array.subArray(a, i, l) Parameters: a - An "array" data object i - An "integer" data object l - An "integer" data object Return: Returns a new "array" data object of "l" elements representing a portion of the given array starting from location "i". Errors: Throws the "IndexOutOfBound" error, if given "i" and "l" are referring to locations out of the element range of "a".
Examples of how to use array.subArray() function:
array.subArray([1, "Two", 3], 1, 2); # returns ["Two",3] array.subArray([1, "Two", 3], 1, 3); # returns "IndexOutOfBound" error
Table of Contents
array.get() - Retrieve Element from Array
x[i] - Array Element Format for array.get()
array.set() - Update Element of Array
x[i] - Array Element Format for array.set()
►array.subArray() - Sub-Array Function
Inheritance - Object Attachments