Interesting user mistake

via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 4 06:38:42 PDT 2015


On Friday, 4 September 2015 at 12:02:26 UTC, Steven Schveighoffer 
wrote:
> On 9/3/15 5:59 PM, Brian Schott wrote:
>> On Thursday, 3 September 2015 at 17:17:26 UTC, Steven 
>> Schveighoffer wrote:
>>> What about all other operations that may be typos from op= 
>>> where op is
>>> also a unary operator? e.g. =-
>>
>> We'd have to special-case '*':
>>
>> a=*b;
>>
>
> You could say the same thing for =-:
>
> a=-b;
>
> seems reasonable for someone who doesn't like whitespace. I 
> think Andrei's rule was the token sequence must have whitespace 
> after the operator in order to be rejected. So the above would 
> be fine.

     Vector!double p;
     p.x=+ 0.27;
     p.y=-11.91;
     p.z=- 8.24;



More information about the Digitalmars-d mailing list