digitalmars.D.learn - No luck with initialising static arrays(was: setting statically sized
- Spacen Jasset (15/24) Jan 28 2008 It still fails with the same error, I did try adding the 'f' suffix, and...
- Extrawurst (4/33) Jan 28 2008 your code snippet works for me axactly like u put it here.
- Spacen Jasset (10/16) Jan 28 2008 ...
- Jarrett Billingsley (5/12) Jan 28 2008 It's not an old page, this is actually Walter's policy. I honestly thin...
- Spacen Jasset (3/24) Jan 28 2008 I don't quite understand. Both the pages say stable version... yet one
- Jarrett Billingsley (4/26) Jan 28 2008 I guess it's just a plain old case of Walter forgetting to update one of...
Try putting the "f" suffix on the first zeros in the second, thirdand foruth rows, too. It works for me:import std.math; void MakeRotationAboutX(float[4][4] m, float angle) { m[] = [[1f, 0, 0, 0], [0f, cos(angle * PI / 180), sin(angle * PI / 180), 0], [0f, -sin(angle * PI / 180), cos(angle * PI / 180), 0], [0f, 0, 0, 1]]; }It still fails with the same error, I did try adding the 'f' suffix, and it's probably needed, but that didn't fix it. I have: On windows: Digital Mars D Compiler v1.015 Copyright (c) 1999-2007 by Digital Mars written by Walter Bright And on linux: gdc (GCC) 4.1.3 20070831 (prerelease gdc 0.25, using dmd 1.021) (Ubuntu 0.25-4.1.2-16ubuntu1) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I can't find any example of this in the offical documentation, nor on google at the moment.
Jan 28 2008
your code snippet works for me axactly like u put it here. try a newer compiler version (dmd1.015 is pretty old) the actual stable release is dmd1.025 (when u need tango) or dmd1.026 when u use phobos. Spacen Jasset schrieb:Try putting the "f" suffix on the first zeros in the second, thirdand foruth rows, too. It works for me:import std.math; void MakeRotationAboutX(float[4][4] m, float angle) { m[] = [[1f, 0, 0, 0], [0f, cos(angle * PI / 180), sin(angle * PI / 180), 0], [0f, -sin(angle * PI / 180), cos(angle * PI / 180), 0], [0f, 0, 0, 1]]; }It still fails with the same error, I did try adding the 'f' suffix, and it's probably needed, but that didn't fix it. I have: On windows: Digital Mars D Compiler v1.015 Copyright (c) 1999-2007 by Digital Mars written by Walter Bright And on linux: gdc (GCC) 4.1.3 20070831 (prerelease gdc 0.25, using dmd 1.021) (Ubuntu 0.25-4.1.2-16ubuntu1) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I can't find any example of this in the offical documentation, nor on google at the moment.
Jan 28 2008
Extrawurst wrote:your code snippet works for me axactly like u put it here. try a newer compiler version (dmd1.015 is pretty old) the actual stable release is dmd1.025 (when u need tango) or dmd1.026 when u use phobos.... Ah Yes, I see the problem now. The dmd web site isn't entiredly up to date, you must go to the DMD 2 page to download the latest dmd 1 compiler: http://www.digitalmars.com/d/2.0/dcompiler.html verses: http://www.digitalmars.com/d/2.0/download.html rather confusing. Looks like the second is pointing to an old page. Thanks for your help.
Jan 28 2008
"Spacen Jasset" <spacenjassset yahoo.co.uk> wrote in message news:fnlg6r$kia$1 digitalmars.com...Ah Yes, I see the problem now. The dmd web site isn't entiredly up to date, you must go to the DMD 2 page to download the latest dmd 1 compiler: http://www.digitalmars.com/d/2.0/dcompiler.html verses: http://www.digitalmars.com/d/2.0/download.html rather confusing. Looks like the second is pointing to an old page.It's not an old page, this is actually Walter's policy. I honestly think he just forgot to update it in a while, because at first, the "stable" download was always about 2 or 3 releases behind, not 11.
Jan 28 2008
Jarrett Billingsley wrote:"Spacen Jasset" <spacenjassset yahoo.co.uk> wrote in message news:fnlg6r$kia$1 digitalmars.com...I don't quite understand. Both the pages say stable version... yet one is newer than the other.Ah Yes, I see the problem now. The dmd web site isn't entiredly up to date, you must go to the DMD 2 page to download the latest dmd 1 compiler: http://www.digitalmars.com/d/2.0/dcompiler.html verses: http://www.digitalmars.com/d/2.0/download.html rather confusing. Looks like the second is pointing to an old page.It's not an old page, this is actually Walter's policy. I honestly think he just forgot to update it in a while, because at first, the "stable" download was always about 2 or 3 releases behind, not 11.
Jan 28 2008
"Spacen Jasset" <spacenjassset yahoo.co.uk> wrote in message news:fnlluh$13ld$1 digitalmars.com...Jarrett Billingsley wrote:I guess it's just a plain old case of Walter forgetting to update one of them :\"Spacen Jasset" <spacenjassset yahoo.co.uk> wrote in message news:fnlg6r$kia$1 digitalmars.com...I don't quite understand. Both the pages say stable version... yet one is newer than the other.Ah Yes, I see the problem now. The dmd web site isn't entiredly up to date, you must go to the DMD 2 page to download the latest dmd 1 compiler: http://www.digitalmars.com/d/2.0/dcompiler.html verses: http://www.digitalmars.com/d/2.0/download.html rather confusing. Looks like the second is pointing to an old page.It's not an old page, this is actually Walter's policy. I honestly think he just forgot to update it in a while, because at first, the "stable" download was always about 2 or 3 releases behind, not 11.
Jan 28 2008