Re: 1--1

From: Doug Miller <doug_at_milmac_dot_com_at_example.com>
Date: Fri, 23 Jan 2015 03:21:09 +0000 (UTC)
Message-ID: <XnsA42AE362CC6dougmilmaccom_at_213.239.209.88>


Kiuhnm Mnhuik <gandalf23_at_mail.com> wrote in news:b38cf7b5-2264-4a00-97fd- 00ca46657d52_at_googlegroups.com:

> On Thursday, January 22, 2015 at 4:50:23 AM UTC+1, Jerry Stuckle wrote:

>> On 1/21/2015 9:16 PM, Doug Miller wrote:
>> > tony_at_mountifield.org (Tony Mountifield) wrote in news:m9oph4$jdf$1
_at_softins.softins.co.uk:
>> >
>> >>
>> >> The second query evaluates the expression 1--1 to the constant 2,
>> >
>> > It does *what*???
>> >
>> (1) - (-1) = 2
>>
>> The syntax he used confused me for a while, also, Doug.

Well, I'll be darned. Learn something new every day. I had always believed the MySQL comment indicator was a double hyphen.

It's not.

It's hyphen, hyphen, SPACE.

So, yes, 1--1 *is* 1 minus negative 1 = 1 + 1 = 2, not a single 1 followed by a comment. Received on Fri Jan 23 2015 - 04:21:09 CET

Original text of this message