Thread overview | ||||||
---|---|---|---|---|---|---|
|
February 01, 2007 Odd operators | ||||
---|---|---|---|---|
| ||||
There are a couple of operators mentioned on <http://www.digitalmars.com/d/lex.html> that I haven’t seen described in the documentation: ‘===’, ‘!~’, and ‘~~’. Any pointers on what they are? --Joel |
February 01, 2007 Re: Odd operators | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joel C. Salomon | "Joel C. Salomon" <JoelCSalomon@Gmail.com> wrote in message news:eprrth$2qfp$1@digitaldaemon.com... > There are a couple of operators mentioned on <http://www.digitalmars.com/d/lex.html> that I haven't seen described in the documentation: '===', '!~', and '~~'. Any pointers on what they are? > > --Joel === is an ancient version of 'is' (and !== is what '!is' used to be). They were removed quite some time ago. ~~ and !~ were for regular expression matching. They lasted one release before they were removed. |
February 01, 2007 Re: Odd operators | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote:
> "Joel C. Salomon" <JoelCSalomon@Gmail.com> wrote in message news:eprrth$2qfp$1@digitaldaemon.com...
>> There are a couple of operators mentioned on <http://www.digitalmars.com/d/lex.html> that I haven't seen described in the documentation: '===', '!~', and '~~'. Any pointers on what they are?
>>
>> --Joel
>
> === is an ancient version of 'is' (and !== is what '!is' used to be). They were removed quite some time ago.
>
> ~~ and !~ were for regular expression matching. They lasted one release before they were removed.
Thanks.
I’m building a lexer for a C compiler (for a Compiler Theory class I’m taking) and I hoped I could make it more-or-less D-compatible, but ~~ and !~ could break C code; glad to know I can leave them out.
--Joel
|
February 01, 2007 Re: Odd operators | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote: > "Joel C. Salomon" <JoelCSalomon@Gmail.com> wrote in message news:eprrth$2qfp$1@digitaldaemon.com... >> There are a couple of operators mentioned on <http://www.digitalmars.com/d/lex.html> that I haven't seen described in the documentation: '===', '!~', and '~~'. Any pointers on what they are? >> >> --Joel > > === is an ancient version of 'is' (and !== is what '!is' used to be). They were removed quite some time ago. > > ~~ and !~ were for regular expression matching. They lasted one release before they were removed. Those should be yanked from the page, so... bug filed: http://d.puremagic.com/issues/show_bug.cgi?id=913 |
Copyright © 1999-2021 by the D Language Foundation