forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharrayDecode.lcdoc
More file actions
32 lines (19 loc) · 1.23 KB
/
Copy patharrayDecode.lcdoc
File metadata and controls
32 lines (19 loc) · 1.23 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
Name: arrayDecode
Type: function
Syntax: arrayDecode(<encodedArray>)
Summary: Converts a serialized array back into the original array.
Introduced: 3.5
OS: mac,windows,linux,ios,android
Platforms: desktop,server,web,mobile
Example:
put arrayDecode(loadPreferencesData("displayOptions")) into sDisplayOptionsArray
Example:
read from socket tClient until linefeed
put urlDecode(arrayDecode(it)) into tClientDataArray
Parameters:
encodedArray (array): A binary string representing an array, as returned by the arrayEncode function.
Description:
Use the <arrayDecode> function to rebuild an array from an encoded string produced by the <arrayEncode function>.
Encoding and decoding arrays is designed to allow arrays to be written to a file on disk, or sent across a network. See the <arrayEncode> reference for more information on doing this.
>*Note:* It is possible for two different strings to produce the same array. This is due to arrays having a different ordering of <keys>. To see if two encoded arrays are equal, first decode them back into the original array, then directly compare them using the <= operator.>
References: = operator. (operator), arrayEncode function (function), keys (function), arrayEncode (function), URLDecode (function)