We are talking about the [atom table]
There are 5 functions that show up in (sysGlobals) of which we have no description, and of which I, at least, have seen no use. They are the following
Code: Select all
(atmAddEntry ...)
(atmAtomTable ...)
(atmDeleteEntry ...)
(atmList ...)
(atmLookup ...)
To create a atomTable use (atmAtomTable). It's syntax is the following:
Code: Select all
(atmAtomTable ((atom1 entry1) (atom2 entry2) ... (atomn entryn))) -> atmtable
Now, an atom is everything except a list, so we should think we could use any non-list value as the atom, and we can. But in practice, the only value that is stored as an atom is an int or a string representation of an int.
Code: Select all
(setq a (atmAtomTable
(list '(string hello) (list "5" " Print") (list 3 "World") '(8 "me"))
))
[atom table]
Code: Select all
(atmList a)
(0 3 5 8)
Too actually get at the data use:
Code: Select all
(atmLookup a 5)
Print
To add data use:
Code: Select all
(atmAddEntry a 2 "Scripting")
Scripting
(atmList a)
(0 2 3 5 8)
Code: Select all
(atmDeleteEntry a 0)
For the curious, yes, i did ask GambitDash about the (symCreate) series, but they are not working, in version 0.99c at least.
For the record, the argument structure is very similar, but let me reference it here.
Code: Select all
(symCreate) -> symTable
(symAddEntry symTable symbol entry) -> entry
(symDeleteEntry symTable symbol) -> True
(symLookup symTable symbol) -> entry