October 12, 2012 In Expression for Static and DYnamic Arrays | ||||
---|---|---|---|---|
| ||||
Attachments:
| Hi, Why the `in` expression can only be applied to associative arrays and cannot be used with static or dynamic arrays as it is possible with, _e.g._, Python? The following code is not legal: ---- int[] a = [1,2,3,4,5]; if (1 in a) { } ---- Are there any technical explanation for this limitation? Thanks, Rizo. -- BF6F0265: FB27 BB4C 8F03 4980 C311 0968 E66B 9831 BF6F 0265 |
Copyright © 1999-2021 by the D Language Foundation