key membership in multi-dimensional assoc. array
Basile B.
b2.temp at gmx.com
Thu Jun 15 02:02:33 UTC 2023
On Thursday, 15 June 2023 at 01:47:45 UTC, Paul wrote:
> I found I can check for key membership in a multi-D aa...
> ```d
> byte zKey = someval;
> byte[byte][byte][byte] cubelist;
>
> foreach(byte xK, yzcubelist; cubelist) {
> foreach(byte yK, zcubelist; yzcubelist) {
> foreach(byte zK, val; zcubelist) {
> ```
> with this expression...
> ```d
> if(zKey in cubelist[xK][yK])
> ```
> Is there a way to check for membership in the x & y dimensions?
> ```d
> if(yKey in cubelist[xK] ??? [zK])
> ```
> *Thanks in advance for any ideas or solutions.*
`&&`
More information about the Digitalmars-d-learn
mailing list