Next: , Previous: , Up: Iteration Control   [Contents][Index]


15.25.6.7 ’for-as-hash’

This is the sixth of seven for/as syntaxes.

for var [type-spec] being {each | the}
    {hash-key | hash-keys | hash-value | hash-values}
    {in | of} hash-table [using ({hash-value | hash-key} other-var)]
as var [type-spec] being {each | the}
    {hash-key | hash-keys | hash-value | hash-values}
    {in | of} hash-table [using ({hash-value | hash-key} other-var)]

This construct iterates over the elements, keys, and values of a hash table. Iteration stops when there are no more hash keys or hash values to be referenced in the specified hash table.


Next: ’for-as-package’, Previous: ’for-as-across’, Up: Iteration Control   [Contents][Index]