-
-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathaddition.xml
More file actions
executable file
·80 lines (57 loc) · 1.5 KB
/
Copy pathaddition.xml
File metadata and controls
executable file
·80 lines (57 loc) · 1.5 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>+ (addition)</name>
<category>Math</category>
<subcategory>Operators</subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
int a = 50 + 5; // Sets 'a' to 55
int b = a + 5; // Sets 'b' to 60
]]></code>
</example>
<example>
<image></image>
<code><![CDATA[
String s1 = "Chernenko";
String s2 = "Brezhnev";
String sc1 = s1 + s2;
String sc2 = s1 + ", Andropov, " + s2;
println(sc1); // Prints "ChernenkoBrezhnev"
println(sc2); // Prints "Chernenko, Andropov, Brezhnev"
]]></code>
</example>
<example>
<image></image>
<code><![CDATA[
String s1 = "Gorbachev";
int i = 1987;
String sc1 = s1 + i;
println(sc1); // Prints "Gorbachev1987"
]]></code>
</example>
<description><![CDATA[
Adds two values or concatenates string values. As a mathematical operator, it calculates the sum of two values. As a string operator, it combines two strings into one and converts from primitive datatypes into the String datatype if necessary.
]]></description>
<syntax>
<c>value1</c> + <c>value2</c>
</syntax>
<parameter>
<label>value1</label>
<description><![CDATA[String, int, float, char, byte, boolean]]></description>
</parameter>
<parameter>
<label>value2</label>
<description><![CDATA[String, int, float, char, byte, boolean]]></description>
</parameter>
<returns></returns>
<related>
++ (increment)
+= (add assign)
- (minus)
</related>
<availability>1.0</availability>
<type>Operator</type>
<partof>PDE</partof>
</root>