Features:
Common
Create and manage a virtually unlimited amount of data in memory with dynamic allocation.
Store and retrieve four basic types of data commonly used: integers, floats, strings, and floating point vectors.
Advanced error handling and warning system
Arrays
Uses indices, theoretically capable of storing 4 billion values on a 32 bit machine.
Only form of dynamic array that supports searching for 'empty' values: best for storing lists of items.
Allows saving and loading of arrays from binary file.
Keytables
Uses strings for indices, with an uncountable number of possible values stored.
Values are stored in arithmatic order, not chronologically. This means anything stored is already sorted according to its key.
Also allows saving and loading from binary file.
Hashtables
Uses hashed strings, with faster storage and retrieval than keytable.
Values are not sortable.
Cannot be saved or loaded from binary file. (But managing a keytable and hashtable simultaneously would be a trivial matter.)
Updated by Anpheus: 5:23 AM 5/8/05. Happy mother's day you old hag Suzuka :p
Update #2 by Anpheus: 10:47 AM 5/8/05. I finished and fully tested Hashtable implementation.
Update #3 by Anpheus: 11:00 PM 5/15/05. Done. 'Final version' as far as I know.
Added natives 'array_save_ascii' and 'keytable_save_ascii' for debug purposes. These functions will read a database saved by array_save or keytable_save (respectively) and produce a human readable version. Example keytable:
Code: Select all
Key Alpha Length 5, Type INTEGER Value: -1
Key Beta Length 4, Type FLOAT Value: -1.000000
Key Delta Length 5, Type VECTOR Value: {-1.000000,-1.000000,-1.000000}
Key Digamma Length 7, Type STRING Length 4 Value: "Vguv"
Key Epsilon Length 7, Type VECTOR Value: {1.000000,1.000000,1.000000}
Key Eta Length 3, Type INTEGER Value: 1
Key Gamma Length 5, Type STRING Length 4 Value: "Test"
Key Zeta Length 4, Type FLOAT Value: 1.000000Code: Select all
Index 0 Type INTEGER, Value: -1
Index 1 Type FLOAT, Value: -1.000000
Index 2 Type STRING, Length: 4 Value: "Test"
Index 3 Type VECTOR, Value: {-1.000000,-1.000000,-1.000000}
Index 4 Type VECTOR, Value: {1.000000,1.000000,1.000000}
Index 5 Type STRING, Length: 4 Value: "Vguv"
Index 6 Type FLOAT, Value: 1.000000
Index 7 Type INTEGER, Value: 1AMXX Server Admins and Scripters: Download ArrayX
