D - internal error
- Carlos (5/5) Jun 17 2002 what does it mean?
- Walter (5/7) Jun 18 2002 It means there's an assertion failure in the compiler source. What it al...
- Carlos (33/33) Jun 18 2002 By commenting out, I found the cause of the error:
- Carlos (3/4) Jun 18 2002 i'm assigning a char[30] to another. obviously, it's the wrong approach....
- Carlos (4/8) Jun 18 2002 how
- Carlos (6/6) Jun 18 2002 I hate when people do it, but now it has happened to me.
- anderson (6/12) Jun 18 2002 that).
- Jonathan Andrew (4/25) Jun 19 2002 Are < and > supposed to work on arrays yet? I really don't
- Walter (3/5) Jun 19 2002 Yes, they should.
- Carlos (9/14) Jun 19 2002 So, if I say
- Sean L. Palmer (4/21) Jun 19 2002 Sounds inefficient.
- Carlos (3/5) Jun 19 2002 i know, but would it? (too late here to code something)
- Walter (4/10) Jun 19 2002 Thanks for the reports. I'll take care of it. -Walter
- Pavel Minayev (3/5) Jun 18 2002 It means that you should send the code which produced such an error
what does it mean? Internal error: ..\ztc\cod4.c 346 ------------------------- Carlos 8294 http://carlos3.netfirms.com/
Jun 17 2002
It means there's an assertion failure in the compiler source. What it also means is I can't fix it unless you send me an example that trips the error! -Walter "Carlos" <carlos8294 msn.com> wrote in message news:aem6s8$vt3$1 digitaldaemon.com...what does it mean? Internal error: ..\ztc\cod4.c 346
Jun 18 2002
By commenting out, I found the cause of the error:
void agregarPais(inout pais[] l) //add country
{
char [30] np;
printf("Ingrese nombre de país: "); //enter a name
scanf("%s",(char*)np);
if ( encontrado(l,np)>0 ) //"encontrado" means "found"
printf("Ya existe %.*s\n",np); //"ya existe" means "already
exists"
else {
int n=l.length+1;
l.length=n;
l[n].nombre=np;
...
}
}
(... are just printf's)
where encontrado() is
int encontrado (pais[] p,char[] n)
{
for (int i=0;i<p.length;i++)
if ( n==(char[] )p[i].nombre )
return i+1;
return 0;
}
and pais is
struct pais {
char [30] nombre; //name
...
};
(... are just int's)
I know the problem is in the first function, because another function uses
encontrado(), but there's nothing wrong with that. Any idea?
Jun 18 2002
this is the line!
l[n].nombre=np;
i'm assigning a char[30] to another. obviously, it's the wrong approach. how
do i do it?
Jun 18 2002
"Carlos" <carlos8294 msn.com> escribió en el mensaje news:aeo6ao$98$1 digitaldaemon.com...this is the line!howl[n].nombre=np;i'm assigning a char[30] to another. obviously, it's the wrong approach.do i do it?(why is it that i don't remember C!!)
Jun 18 2002
I hate when people do it, but now it has happened to me. To compare two char [30], there're 2 ways: using == or using ===. By using ==, it only compares the first character and the length (I don't need that). But by using === I get this: Internal error: ..\ztc\cod3.c 711 So?
Jun 18 2002
"Carlos" <carlos8294 msn.com> wrote in message news:aeok8r$eo1$1 digitaldaemon.com...I hate when people do it, but now it has happened to me. To compare two char [30], there're 2 ways: using == or using ===. By using ==, it only compares the first character and the length (I don't needthat).But by using === I get this: Internal error: ..\ztc\cod3.c 711 So?"==" is ment to compare the entire array (well until it find to items that match). "===" compares the reference. I think this complier bug has already been reported to Walter.
Jun 18 2002
anderson wrote:"Carlos" <carlos8294 msn.com> wrote in message news:aeok8r$eo1$1 digitaldaemon.com...Are < and > supposed to work on arrays yet? I really don't want to use strcmp()! -JonI hate when people do it, but now it has happened to me. To compare two char [30], there're 2 ways: using == or using ===. By using ==, it only compares the first character and the length (I don't needthat).But by using === I get this: Internal error: ..\ztc\cod3.c 711 So?"==" is ment to compare the entire array (well until it find to items that match). "===" compares the reference. I think this complier bug has already been reported to Walter.
Jun 19 2002
"Jonathan Andrew" <jon ece.arizona.edu> wrote in message news:3D111140.2000009 ece.arizona.edu...Are < and > supposed to work on arrays yet? I really don't want to use strcmp()!Yes, they should.
Jun 19 2002
"Walter" <walter digitalmars.com> escribió en el mensaje news:aer8jq$6qp$1 digitaldaemon.com..."Jonathan Andrew" <jon ece.arizona.edu> wrote in message news:3D111140.2000009 ece.arizona.edu...So, if I say if (charArr1 < charArr2 || charArr1 > charArr2) { //arrays are different ... } else { //array are the same ... } it should work?Are < and > supposed to work on arrays yet? I really don't want to use strcmp()!Yes, they should.
Jun 19 2002
Sounds inefficient. Sean "Carlos" <carlos8294 msn.com> wrote in message news:aerm5r$jrl$1 digitaldaemon.com..."Walter" <walter digitalmars.com> escribió en el mensaje news:aer8jq$6qp$1 digitaldaemon.com..."Jonathan Andrew" <jon ece.arizona.edu> wrote in message news:3D111140.2000009 ece.arizona.edu...So, if I say if (charArr1 < charArr2 || charArr1 > charArr2) { //arrays are different ... } else { //array are the same ... } it should work?Are < and > supposed to work on arrays yet? I really don't want to use strcmp()!Yes, they should.
Jun 19 2002
"Sean L. Palmer" <seanpalmer earthlink.net> escribió en el mensaje news:aermv1$kgr$1 digitaldaemon.com...Sounds inefficient. Seani know, but would it? (too late here to code something)
Jun 19 2002
Thanks for the reports. I'll take care of it. -Walter "Carlos" <carlos8294 msn.com> wrote in message news:aeok8r$eo1$1 digitaldaemon.com...I hate when people do it, but now it has happened to me. To compare two char [30], there're 2 ways: using == or using ===. By using ==, it only compares the first character and the length (I don't needthat).But by using === I get this: Internal error: ..\ztc\cod3.c 711 So?
Jun 19 2002
On Mon, 17 Jun 2002 21:51:36 -0500 "Carlos" <carlos8294 msn.com> wrote:what does it mean? Internal error: ..\ztc\cod4.c 346It means that you should send the code which produced such an error to Walter, for him to reproduce the error and fix the bug. =)
Jun 18 2002









"Carlos" <carlos8294 msn.com> 