Changes

Jump to navigation Jump to search
480 bytes added ,  21:36, 9 August 2014
no edit summary
| '''Summary'''
| Gets an array containing all members from a supplied array starting at a supplied position, up to a specified length.<br/>The two-argument version of the function returns the same result as the three-argument version when called with $length equal to the value of {{Code|array:size($array) - $start + 1}}.
|-
| '''Errors'''
|{{Error|FOAY0001|#Errors}} if {{Code|$start}} is less than one, or if {{Code|$start + $length}} is greater than {{Code|array:size($array) + 1}}.<br/>{{Error|FOAY0002|#Errors}} if {{Code|$length}} is less than zero.
|-
| '''Examples'''
|
* <code>array:append(['member1'], 'member1member2')</code> returns the array {{Code|["member1", "member2"]}}.
|}
|
* <code>array:serialize([ 1, (2, 3), 4 to 6 ])</code> returns <code>[1, (2, 3), (4, 5, 6)]</code>.
|}
 
=Errors=
 
{| class="wikitable" width="100%"
! width="110"|Code
|Description
|-
|{{Code|FOAY0001}}
|The specified index extends beyonds the bounds of an array.
|-
|{{Code|FOAY0002}}
|The specified length is less than zero.
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu