by Brian Zablocky (4 Submissions)
Category: Data Structures
Compatability: VB Script
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (6 Votes)
ZabArray stores data in Key/Value pairs like a collection. The key difference is that ZabArrays allow you to serialize the data into a string (PHP function) which can be saved to a text file or the registry. The string can be loaded into a different ZabArray to restore the entire structure.
Inputs
A key (string) and and associated value. Value is solid data types like Int, Lng, Sng, Dbl, Cur, String, Byte, Bool, and Date. Also accepts a single-line string representing the data that was created from another ZabArray.
Assumes
You cannot store arrays or objects in a ZabArray because of problems converting them to a string.
Code Returns
The same data that was input. Also returns a single-line string representing the data for restoration later.
Side Effects
The memory used by the data is 10% larger than the actual data. During serialization and unserialization the data is 120% larger until the process is complete.
API Declarations'
' No API. Everything is hard-coded.
'
Download ZabArray (11 KB)