Changes

Jump to navigation Jump to search
No change in size ,  15:56, 16 November 2023
Reorder
|}
==array:sizeget==
{| width='100%'
| width='120' | '''Signature'''
|<pre>array:sizeget( $array as array(*),) $position as xs:integer) as item()*</pre>
|- valign="top"
| '''Summary'''
| Returns the number of members in {{Code|$array}} member at the specified {{Code|$position}}. Note that because an array |- valign="top"| '''Errors'''|{{Error|FOAY0001|#Errors}} {{Code|$position}} is an item, not in the range {{Code|fn:count1}} function when applied to an array always returns {{Code|1array:size($array)}}inclusive.
|- valign="top"
| '''Examples'''
|
* <code>array:sizeget(array { reverse(1 to 10 }5)</code> returns {{Code|10}}.* <code>array:size([1 to 10], 5)</code> returns the value {{Code|1}}, because the array contains a single sequence with 10 integers.
|}
==array:gethead==
{| width='100%'
| width='120' | '''Signature'''
|<pre>array:gethead( $array as array(*), $position as xs:integer
) as item()*</pre>
|- valign="top"
| '''Summary'''
| Returns the first member of {{Code|$array}} member at . This function is equivalent to the specified expression {{Code|$positionarray(1)}}.
|- valign="top"
| '''Errors'''
|{{Error|FOAY0001|#Errors}} The array is empty.|- valign="top"| '''Examples'''|* <code>array:head(["a", "b"])</code> returns {{Code|$position"a"}} is not in .* <code>array:head([["a", "b"], ["c", "d"]])</code> returns the range array {{Code|1["a", "b"]}}.|} to  ==array:size== {{Code|width='100%'| width='120' | '''Signature'''|<pre>array:size( $array as array(*)) as xs:integer</pre>|- valign="top"| '''Summary'''| Returns the number of members in {{Code|$array}}. Note that because an array is an item, the {{Code|fn:count}} function when applied to an array always returns {{Code|1}} inclusive.
|- valign="top"
| '''Examples'''
|
* <code>array:getsize(array { reverse(1 to 510 }) </code> returns {{Code|10}}, 5.* <code>array:size([1 to 10])</code> returns the value {{Code|1}}, because the array contains a single sequence with 10 integers.
|}
|
* <code>array:insert-before(["a"], 1, "b")</code> returns the array {{Code|["b", "a"]}}.
|}
 
==array:head==
 
{| width='100%'
| width='120' | '''Signature'''
|<pre>array:head(
$array as array(*)
) as item()*</pre>
|- valign="top"
| '''Summary'''
| Returns the first member of {{Code|$array}}. This function is equivalent to the expression {{Code|$array(1)}}.
|- valign="top"
| '''Errors'''
|{{Error|FOAY0001|#Errors}} The array is empty.
|- valign="top"
| '''Examples'''
|
* <code>array:head(["a", "b"])</code> returns {{Code|"a"}}.
* <code>array:head([["a", "b"], ["c", "d"]])</code> returns the array {{Code|["a", "b"]}}.
|}
administrator, Bureaucrats, editor, reviewer, Administrators
57

edits

Navigation menu