forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharrayDecode.xml
More file actions
46 lines (46 loc) · 2.02 KB
/
Copy patharrayDecode.xml
File metadata and controls
46 lines (46 loc) · 2.02 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
<doc>
<legacy_id>3518</legacy_id>
<name>arrayDecode</name>
<type>function</type>
<syntax>
<example>arrayDecode(<i>encodedArray</i>)</example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>Writing LiveCode</category>
</classification>
<references>
<function tag="arrayEncode">arrayEncode Function</function>
<function tag="URLDecode">URLDecode Function</function>
</references>
<history>
<introduced version="3.5">Added.</introduced>
</history>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<server/>
<web/>
<mobile/>
</classes>
<security>
</security>
<summary>Converts a serialized array back into the original array.</summary>
<examples>
<example>put arrayDecode(loadPreferencesData("displayOptions")) into sDisplayOptionsArray</example>
<example>read from socket tClient until linefeed</p><p>put urlDecode(arrayDecode(it)) into tClientDataArray</example>
</examples>
<description>
<p>Use the <b>arrayDecode</b> function to rebuild an array from an encoded string produced by the <function tag="arrayEncode">arrayEncode function</function>. </p><p/><p><b>Parameters:</b></p><p>The <i>encodedArray</i> is a binary string representing an array, as returned by the <function tag="arrayEncode">arrayEncode function</function>.</p><p/><p><b>Comments:</b></p><p>Encoding and decoding arrays is designed to allow arrays to be written to a file on disk, or sent across a network. See the <function tag="arrayEncode">arrayEncode</function> reference for more information on doing this.</p><p/><p><b>Note:</b> It is possible for two different strings to produce the same array. This is due to arrays having a different ordering of <function tag="keys">keys</function>. To see if two encoded arrays are equal, first decode them back into the original array, then directly compare them using the <operator tag="=">= operator.</operator></p>
</description>
</doc>