Share via


DictIndex.numberOfFields Method

Returns the number of fields in the index definition.

Syntax

public int numberOfFields()

Run On

Called

Return Value

Type: int
The number of fields in the index.

Examples

The following example shows the retrieval of the number of fields in the index and lists the names of the fields in the index.

Dictionary dict; 
DictTable  table; 
DictIndex  idx; 
DictField  field; 
int i; 
 
dict = new Dictionary(); 
table = new DictTable(dict.tableName2Id("Address")); 
idx = new DictIndex(table.id(), table.indexName2Id("AddrIdx")); 
for (i=1; i <= idx.numberOfFields(); i++) 
{ 
    field = new DictField(table.id(), idx.field(i)); 
    print field.name(); 
}

See Also

Reference

DictIndex Class