-
-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathlong.xml
More file actions
57 lines (40 loc) · 1.59 KB
/
Copy pathlong.xml
File metadata and controls
57 lines (40 loc) · 1.59 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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>long</name>
<category>Data</category>
<subcategory>Primitive</subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
long a; // Declare variable 'a' of type long
a = 23; // Assign 'a' the value 23
long b = -256; // Declare variable 'b' and assign it the value -256
long c = a + b; // Declare variable 'c' and assign it the sum of 'a' and 'b'
int i = (int)c; // Converts the value of 'c' from a long to an int
]]></code>
</example>
<description><![CDATA[
Datatype for large integers. While integers can be as large as 2,147,483,647 and as low as -2,147,483,648 (stored as 32 bits), a <b>long</b> integer has a minimum value of -9,223,372,036,854,775,808 and a maximum value of 9,223,372,036,854,775,807 (stored as 64 bits). Use this datatype when you need a number to have a greater magnitude than can be stored within an <b>int</b>. Processing functions don't use this datatype, so while they work in the language, you'll usually have to convert to a <b>int</b> using the <b>(int)</b> syntax before passing into a function.
]]></description>
<syntax>
long <c>var</c>
long <c>var</c> = <c>value</c>
</syntax>
<parameter>
<label>var</label>
<description><![CDATA[variable name referencing the value]]></description>
</parameter>
<parameter>
<label>value</label>
<description><![CDATA[any integer value]]></description>
</parameter>
<returns></returns>
<related>
int
</related>
<availability>1.0</availability>
<type>Datatype</type>
<partof>PDE</partof>
<level>Extended</level>
</root>