On 8.3.2010 7:54, Walter Bright wrote:
Lots of meat and potatoes here, and a cookie! (spelling checker for
error messages)

http://www.digitalmars.com/d/1.0/changelog.html
http://ftp.digitalmars.com/dmd.1.057.zip


http://www.digitalmars.com/d/2.0/changelog.html
http://ftp.digitalmars.com/dmd.2.041.zip

Thanks to the many people who contributed to this update!

In 2.040 this worked:

real x = 1.2;

real[4][4] M2 = [
        [1, 0, 0, x],
        [0, 1, 0, x],
        [0, 0, 1, x],
        [0, 0, 0, 1]
];


In 2.041 it has to be written like this:

real x = 1.2;

real[4][4] M2 = [
        [1, 0, 0, x],
        [0, 1, 0, x],
        [0, 0, 1, x],
        [0, 0, 0, cast(real)1]
];

Don't know if the first one should still work and this is a bug or is the new behaviour ok so I am checking here.

The error on the first array initialization in 2.041 is

Error: incompatible types for (([cast(real)1,cast(real)0,cast(real)0,x]) ? ([0,0,0,1])): 'real[]' and 'int[]' ArraysTest.d(23): Error: cannot implicitly convert expression ([0L,1L,0L,x]) of type real[] to int ArraysTest.d(23): Error: cannot implicitly convert expression ([0L,0L,1L,x]) of type real[] to int

Reply via email to