symNext basic EMF

Synopsis

Finds the next value for a given symbol table after symFirst is called.

Prototype

 #include "uemf.h"

 sym_t *symNext(sym_fd_t sd);

Parameters

sdHandle to the table that was passed to symFirst.

Description

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 next symbol in the hashtable if there is one. This call is used as the loop body in traversing the table. A call to symFirst must be performed followed by calls to symNext to receive the remaining entries.

Return Value

Returns a pointer to a sym_t structure which contains the value. NULL if not found.

Example

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);
}

Stability Classification

Evolving.

See Also

symClose, symDelete, symEnter, symFirst, symLookup, symOpen