Problem with passing ref parameters to properties
Leandro Lucarella
luca at llucax.com.ar
Fri May 25 05:55:48 PDT 2012
Dejan Lekic, el 25 de mayo a las 11:59 me escribiste:
> SebastianA wrote:
>
> > I had not tested the code with DMD. We need x64 support, so we
> > need GDC for that at the moment. However, I tried compiling with
> > DMD and it seems that the line
> >
> > t.vPosition = (Clock.currStdTime % 2 == 0) ? Vec(2, 2) : Vec(3,
> > 3);
> >
> > does not compile with the latest DMD compiler. I get the error:
> >
> > test.d(23): Error: not a property t.vPosition
> >
> > when trying that. If I remove the ternary operator and just
> > assign Vec(2, 2) to the property, it works as expected. Am I
> > missing something here? Why cannot I write the code as listed
> > above?
>
> DMD has the -m64 switch for x86_64. AFAIK it produces 64bit executables even
> without it, on x86_64 machine.
No, the default architecture it's bounded to the architecture the
compiler was compiled for. If DMD is compiled in 32bit, it will default
to 32bit even on a x86_64 OS (at least in Linux). AFAIK it doesn't do
any runtime checking at all for the arch.
--
Leandro Lucarella (AKA luca) http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Es mejor probar el sabor de sapo y darse cuenta que es feo,
antes que no hacerlo y creer que es una gran gomita de pera.
-- Dr Ricardo Vaporesso, Malta 1951
More information about the D.gnu
mailing list