This class uses a dynamic library to implement global variables and lists in Euler.
Euler functions can access global variables, if useglobal or global is enabled. But they cannot change the type of global variables or their size. The lists library provided a way to set global variables.
Sometimes list of objects with different types are needed. The list library provides those lists. The lists have names, and are accessed by names. There are functions to add an Euler object to a list, to get the item by number, or remove an item from the list. To clean, up you can remove a list, or clear all lists.
The lists are stored in arrays, which can grow if needed. The initial capacity is 32 and grows by doubling. The names of the lists are stored in a hashtable of capacity 256. This should work smooth enough for a few thousands of lists.
Needs to be loaded with "load lists".
function globalset (name:string, object) Set the a global library variable.
function globalget (name:string) Get a global library variable.
function makelist (name:string) Creates a new list with this name or resets the list. If the list exists, it has to be removed first.
function listadd (name:string, object) Adds an object to the list.
function listsize (name:string) The length of the list
function listget (name:string, i:index) Gets object number i from the list.
function listremove (name:string, i:index) Removes object number i from the list.
function removelist (name:string) Removes a list
function removeall () Remove all lists and release the memory.
function listglobals () List all global variables in the library (unsorted).
function listlists () List all lists in the library (unsorted).