D - assoc-arrays; "not in" syntax
- Matthew Wilson (24/24) Feb 05 2004 if(file1 in map2)
- Stewart Gordon (15/22) Feb 06 2004 While it was 6/2/04 7:14 am throughout the UK, Matthew Wilson sprinkled
- Hauke Duden (5/15) Feb 06 2004 Hmmm. Somehow, this doesn't quite fit into the language.
- Matthew (3/17) Feb 06 2004 That would be fine.
- Matthew (3/19) Feb 06 2004 I don't see that that follows. What has == got to do with the "in" opera...
- Stewart Gordon (11/17) Feb 09 2004 While it was 6/2/04 8:59 pm throughout the UK, Matthew sprinkled little
if(file1 in map2) { } else { printf(" %.*s\n", file1); } works ok, but if(file1 not in map2) { printf(" %.*s\n", file1); } fails, as does if(not file1 in map2) { printf(" %.*s\n", file1); } the only other one that works is if(!(file1 in map2)) { printf(" %.*s\n", file1); } I like the second form. Can we have that? Matthew
Feb 05 2004
While it was 6/2/04 7:14 am throughout the UK, Matthew Wilson sprinkled little black dots on a white screen, and they fell thus: <snip>if(file1 not in map2) { printf(" %.*s\n", file1); } fails<snip>I like the second form. Can we have that?I guess that's really a matter if whether the syntactic sugar of such compound operators is worth implementing. If we're going to allow this, then we might as well allow such expressions as qwert not == yuiop asdfg not || hjkl etc. Stewart. -- My e-mail is valid but not my primary mailbox, aside from its being the unfortunate victim of intensive mail-bombing at the moment. Please keep replies on the 'group where everyone may benefit.
Feb 06 2004
Stewart Gordon wrote:Hmmm. Somehow, this doesn't quite fit into the language. Why not using the "normal" way for C-based languages? I.e. if(a !in b) Haukeif(file1 not in map2) I like the second form. Can we have that?I guess that's really a matter if whether the syntactic sugar of such compound operators is worth implementing. If we're going to allow this, then we might as well allow such expressions as qwert not == yuiop asdfg not || hjkl
Feb 06 2004
"Hauke Duden" <H.NS.Duden gmx.net> wrote in message news:c00eoq$1870$1 digitaldaemon.com...Stewart Gordon wrote:That would be fine.Hmmm. Somehow, this doesn't quite fit into the language. Why not using the "normal" way for C-based languages? I.e. if(a !in b)if(file1 not in map2) I like the second form. Can we have that?I guess that's really a matter if whether the syntactic sugar of such compound operators is worth implementing. If we're going to allow this, then we might as well allow such expressions as qwert not == yuiop asdfg not || hjkl
Feb 06 2004
"Stewart Gordon" <smjg_1998 yahoo.com> wrote in message news:c00bc1$12jt$1 digitaldaemon.com...While it was 6/2/04 7:14 am throughout the UK, Matthew Wilson sprinkled little black dots on a white screen, and they fell thus: <snip>I don't see that that follows. What has == got to do with the "in" operator?if(file1 not in map2) { printf(" %.*s\n", file1); } fails<snip>I like the second form. Can we have that?I guess that's really a matter if whether the syntactic sugar of such compound operators is worth implementing. If we're going to allow this, then we might as well allow such expressions as qwert not == yuiop asdfg not || hjkl
Feb 06 2004
While it was 6/2/04 8:59 pm throughout the UK, Matthew sprinkled little black dots on a white screen, and they fell thus: <snip>Comparatively little. But plenty in common: - both are binary operators - both evaluate to a boolean value Stewart. -- My e-mail is valid but not my primary mailbox, aside from its being the unfortunate victim of intensive mail-bombing at the moment. Please keep replies on the 'group where everyone may benefit.qwert not == yuiop asdfg not || hjklI don't see that that follows. What has == got to do with the "in" operator?
Feb 09 2004