DMD 1.019 and 2.003 releases

James Dennett jdennett at acm.org
Mon Jul 23 21:25:31 PDT 2007


BCS wrote:
> Reply to Derek,
> 
>> Are you serious??? Why are we allowed to do mathematics with
>> characters?
>>
> 
> I have done this a few times
> 
> char c;
> int v = (c - '0')

Perfectly reasonable, as is character +/- integer, but
character + character is nonsense, just as it makes sense
to subtract two points yielding a vector, or add a vector
to a point (yielding a point) but no sense to "add" two
points in a mere affine space.

-- James



More information about the Digitalmars-d-announce mailing list