DMD 1.019 and 2.003 releases

Derek Parnell derek at psych.ward
Mon Jul 23 13:59:35 PDT 2007


On Mon, 23 Jul 2007 12:22:32 -0700, Walter Bright wrote:

> Don Clugston wrote:
>> Walter Bright wrote:
>>> Don Clugston wrote:
>>>> I'm having trouble understanding the difference between "isScalar", 
>>>> "isArithmetic", and "isIntegral". Is this table correct?
>>>>
>>>> int uint real wchar
>>>> Y   Y    Y    N     isArithmetic
>>>> N   N    Y    N     isFloating
>>>> Y   Y    N    Y     isIntegral
>>>> Y   Y    Y    Y     isScalar
>>>> N   Y    N    N     isUnsigned
>>>>
>>>> ----------------
>>>
>>> wchar is arithmetic and unsigned.
>> 
>> OK. Then is there any difference between scalar and arithmetic ?
> 
> scalar includes pointers.

And yet one can do (some) arithmetic on pointers ... !?

import std.stdio;
void main()
{
  int i;
  int* p;
  p = &i;
  p += 2;
  writefln("%s %s", &i, p);
}
-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell



More information about the Digitalmars-d-announce mailing list