Content deleted Content added
m →FoxPro |
m →Pike |
||
Line 865:
Iterating through a mapping can be done using either foreach:
<source lang=
foreach(phonebook; string key; string value) {
write("%s:%s\n", key, value);
Line 873:
Or using an iterator object:
<source lang=
Mapping.Iterator i = get_iterator(phonebook);
while (i->index()) {
Line 883:
Elements of a mapping can be removed using m_delete, which returns the value of the removed index:
<source lang=
string sallys_number = m_delete(phonebook, "Sally Smart");
</source>
|