Error getting tags :
error 404Error getting tags :
error 404 arrayEncode | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
arrayEncode
Basics
Expander triangle
Type
Function
Syntax

arrayEncode(array)

Introduced
3.5
Environment
Desktop, Web and Server
Platform Support
Mac OS X,Windows,Linux
Security
None required
Summary
Serializes a Revolution array.
Examples

savePreferencesData "displayOptions", arrayEncode(sDisplayOptionsArray)
write urlEncode(arrayEncode(tArray)) to socket tSocket

Additional Comments
Expander triangle

Use the arrayEncode function to convert an array into a string so that it can be saved to a file or sent across a network.

Parameters

The array is a Revolution array.

Value

The arrayEncode function returns a string of binary data that represents the data and structure of the specified array.

Comments

The string returned by the arrayEncode function is designed to be used to transfer arrays to remote machines or to save them to a file on disk. It is an opaque, binary encoding of the data contained in the array. The original array can be rebuilt by using the arrayDecode function. Note that encoded arrays cannot easily be modified, and should always be converted back into real arrays before attemping to access or modify them.

To send an encoded array to a remote process over TCP/IP, it should be encoded using the URLEncode function, as it may contain characters not suitable for use in URLs.

Note that arrays in Revolution are un-ordered. This means in particular that encoding two arrays will not necessarily produce the same result, even if the arrays had the same elements. To compare two arrays, simply use the = operator directly on them rather than encoding them first.

User Comments
Expander triangle