DictTable.indexNext Method

Returns the value of the next index ID during an index iteration of the table.

Syntax

public IndexId indexNext(IndexId id)

Run On

Called

Parameters

Return Value

Type: IndexId Extended Data Type
The ID of the next index in the index iteration for the table; 0 (zero) if there are no more indexes to iterate.

Remarks

The value of the id parameter should evaluate to 0 (zero) to start the index iteration, and the return value should be used for subsequent calls to the iteration.

Examples

The following example iterates through the indexes of a table.

DictTable   dt; 
DictIndex   di; 
int         counter; 
 
counter = 0; 
 
dt = new DictTable(tablenum(CustTable)); 
if (dt) 
{ 
    counter = dt.indexNext(counter); 
    while (counter) 
    { 
        di = dt.indexObject(counter); 
        if (di) 
        { 
            print strfmt("ID: %1 Name: %2", 
                         di.id(), 
                         di.name() ); 
        } 
        counter = dt.indexNext(counter); 
 
    } 
}

See Also

DictTable Class

DictTable.indexObject Method

DictIndex Class