forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappend.xml
More file actions
executable file
·54 lines (39 loc) · 1.3 KB
/
Copy pathappend.xml
File metadata and controls
executable file
·54 lines (39 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>append()</name>
<category>Data</category>
<subcategory>Array Functions</subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
String[] sa1 = { "OH ", "NY ", "CA "};
String[] sa2 = append(sa1, "MA ");
println(sa2); // Prints OH, NY, CA, MA
]]></code>
</example>
<description><![CDATA[
Expands an array by one element and adds data to the new position. The datatype of the <b>element</b> parameter must be the same as the datatype of the array.
<br/> <br/>
When using an array of objects, the data returned from the function must be cast to the object array's data type. For example: <em>SomeClass[] items = (SomeClass[]) append(originalArray, element)</em>.
]]></description>
<syntax><![CDATA[
append(<kbd>array</kbd>, <kbd>element</kbd>)
]]></syntax>
<parameter>
<label>array</label>
<description><![CDATA[boolean[], byte[], char[], int[], float[], or String[], or an array of objects]]></description>
</parameter>
<parameter>
<label>element</label>
<description><![CDATA[new data for the array]]></description>
</parameter>
<returns>Array (the same datatype as the input)</returns>
<related>
shorten()
expand()
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
</root>