Page 1 of 1

ArrayX

Posted: Fri Oct 16, 2026 8:07 pm
by Archive-Poster
ArrayX Version 1.17

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.000000
Example array:

Code: 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: 1
AMXX Developers: Download JudySourceComplete and ArrayX_Source
AMXX Server Admins and Scripters: Download ArrayX

Re: ArrayX

Posted: Fri Oct 16, 2026 10:32 pm
by Archive-Poster
New iteration of ArrayX, now with moar awesome.

I've upgraded arrays and keytables to use the cellarray syntax and a unified return structure, making it much easier to figure out (and no messy specifics).

Backward compatibility has been maintained for the most part, with a few patches needing to be fixed. Not that anyone really cares.

The main thing is that the linux version links, hopefully statically, against ++.a. It only needs three functions, but it might dynamically link, in which case, well, linux compatibility is screwed.

Tested for most functions on win32. untested, but compiled, on linux.