symFirst | basic | EMF |
Finds the first value for a given symbol table
sym_t *symFirst(sym_fd_t sd);
sd | Handle to the table created from a previous call to symOpen |
This module implements a highly efficient generic symbol table with update and access routines. Symbols are simple character strings and the values they take can be flexible types as defined by value_t. This module allows multiple symbol tables to be created.
Return the first symbol in the hashtable if there is one. This call is used as the first step in traversing the table. A call to symFirst should be followed by calls to symNext to get all the rest of the entries.
Returns a pointer to a sym_t structure which contains the value. NULL if not found.
sym_fd_t data; sym_t* elem; elem = symFirst(data); while (elem != NULL) { ejSetVar(0, elem->name.value.string, elem->content.value.string); elem = symNext(data); }