-
-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy patharrayaccess.xml
More file actions
executable file
·66 lines (44 loc) · 1.34 KB
/
arrayaccess.xml
File metadata and controls
executable file
·66 lines (44 loc) · 1.34 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
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>[] (array access)</name>
<category>Structure</category>
<subcategory></subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
int[] numbers = new int[3];
numbers[0] = 90;
numbers[1] = 150;
numbers[2] = 30;
int a = numbers[0] + numbers[1]; // Sets variable 'a' to 240
int b = numbers[1] + numbers[2]; // Sets variable 'b' to 180
]]></code>
</example>
<description><![CDATA[
The array access operator is used to specify a location within an array. The data at this location can be defined with the syntax <b>array[element] = value</b> and read with the syntax <b>value = array[element]</b> as shown in the above example.
]]></description>
<syntax>
<c>datatype</c>[]
<c>array</c>[<c>element</c>]
</syntax>
<parameter>
<label>datatype</label>
<description><![CDATA[any primitive or compound datatype, including user-defined classes]]></description>
</parameter>
<parameter>
<label>array</label>
<description><![CDATA[any valid variable name]]></description>
</parameter>
<parameter>
<label>element</label>
<description><![CDATA[int: must not exceed the length of the array minus 1]]></description>
</parameter>
<returns></returns>
<related>
Array
</related>
<availability>1.0</availability>
<type>Operator</type>
<partof>PDE</partof>
</root>