roxen.lists.pike.general
Subject | Author | Date |
---|---|---|
foreach on mapping | Henrik Grubbström <30[at]community[dot]roxen[dot]com> | 20-07-2009 |
>Is it possible to use foreach on a mapping? Yes, as long as you use the iterator syntax: foreach(m; mixed ind; mixed val) { // ... } In old pikes without iterators, you had to use the following construct: foreach(indices(m), mixed ind) { mixed val = m[ind]; // ... } |