9.78 StringTable

This domain provides a table type in which the keys are known to be strings so special techniques can be used. Other than performance, the type StringTable(S) should behave exactly the same way as Table(String,S). See TableXmpPage for general information about tables.

This creates a new table whose keys are strings.

t: StringTable(Integer) := table()

Type: StringTable Integer

The value associated with each string key is the number of characters in the string.

for s in split("My name is Ian Watt.",char " ")
    t.s := #s


for key in keys t repeat output [key, t.key]