www.digitalmars.com         C & C++   DMDScript  

D - internal assertion

reply "Sean L. Palmer" <seanpalmer earthlink.net> writes:
import windows;
import opengl;

int main()
{
  GLfloat[4] matAmb = [ 1.0F,1.0F,1.0F, 1.0F ];
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT,matAmb);
}

For some reason this produces:

\dmd\bin\dmd -c testgl -I\dmd\src\phobos
Assertion failure: 'ie' on line 253 in file 'declaration.c'

Hey, also just noticed if you have an EOL comment
// a comment
that is on the LAST LINE of a file, the compiler gets confused:

\dmd\bin\dmd -c testgl -I\dmd\src\phobos
testgl.d(813): // comment does not end in newline

That's right... it ends in EOF  ;)

I'm finding that version(disabled) { ... }  works fine for commenting out
large blocks of code.

Sean
May 27 2002
next sibling parent "Walter" <walter digitalmars.com> writes:
That would be a compiler bug.

"Sean L. Palmer" <seanpalmer earthlink.net> wrote in message
news:acu5qd$2hfr$1 digitaldaemon.com...
 import windows;
 import opengl;

 int main()
 {
   GLfloat[4] matAmb = [ 1.0F,1.0F,1.0F, 1.0F ];
   glLightModelfv(GL_LIGHT_MODEL_AMBIENT,matAmb);
 }

 For some reason this produces:

 \dmd\bin\dmd -c testgl -I\dmd\src\phobos
 Assertion failure: 'ie' on line 253 in file 'declaration.c'

 Hey, also just noticed if you have an EOL comment
 // a comment
 that is on the LAST LINE of a file, the compiler gets confused:

 \dmd\bin\dmd -c testgl -I\dmd\src\phobos
 testgl.d(813): // comment does not end in newline

 That's right... it ends in EOF  ;)

 I'm finding that version(disabled) { ... }  works fine for commenting out
 large blocks of code.

 Sean
May 27 2002
prev sibling next sibling parent "Pavel Minayev" <evilone omen.ru> writes:
"Sean L. Palmer" <seanpalmer earthlink.net> wrote in message
news:acu5qd$2hfr$1 digitaldaemon.com...

 import windows;
 import opengl;

 int main()
 {
   GLfloat[4] matAmb = [ 1.0F,1.0F,1.0F, 1.0F ];
   glLightModelfv(GL_LIGHT_MODEL_AMBIENT,matAmb);
 }

 For some reason this produces:

 \dmd\bin\dmd -c testgl -I\dmd\src\phobos
 Assertion failure: 'ie' on line 253 in file 'declaration.c'
A known issue. The compiler doesn't like the fact that you've declared static array on the stack and initialized it (the same happens to struct). Use dynamic arrays instead, or just make it static.
May 27 2002
prev sibling parent "OddesE" <OddesE_XYZ hotmail.com> writes:
"Sean L. Palmer" <seanpalmer earthlink.net> wrote in message
news:acu5qd$2hfr$1 digitaldaemon.com...

<SNIP>
 I'm finding that version(disabled) { ... }  works fine for commenting out
 large blocks of code.

 Sean
Or you can use D's new-and-improved nesting comments: /+ /+ This comment is nested +/ /* Old style comments do not nest... */ // The new comments nest all others... +/ Specifically introduced for this kind of purpose. Yes we D programmers are a spoiled bunch! :) -- Stijn OddesE_XYZ hotmail.com http://OddesE.cjb.net _________________________________________________ Remove _XYZ from my address when replying by mail
May 29 2002