Thread overview | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
June 18, 2002 internal error | ||||
---|---|---|---|---|
| ||||
what does it mean? Internal error: ..\ztc\cod4.c 346 ------------------------- Carlos 8294 http://carlos3.netfirms.com/ |
June 18, 2002 Re: internal error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos | 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 |
June 18, 2002 Re: internal error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos | On Mon, 17 Jun 2002 21:51:36 -0500 "Carlos" <carlos8294@msn.com> wrote:
> what does it mean?
> Internal error: ..\ztc\cod4.c 346
It means that you should send the code which produced such an error to Walter, for him to reproduce the error and fix the bug. =)
|
June 18, 2002 Re: internal error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | 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? |
June 18, 2002 Re: internal error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos | 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?
|
June 18, 2002 Re: internal error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos | "Carlos" <carlos8294@msn.com> escribió en el mensaje news:aeo6ao$98$1@digitaldaemon.com... > 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? > (why is it that i don't remember C!!) |
June 19, 2002 Re: internal error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos | 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? |
June 19, 2002 Re: internal error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos | "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 need that). > 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. |
June 19, 2002 Re: internal error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos | 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 need that). > But by using === I get this: > > Internal error: ..\ztc\cod3.c 711 > > So? > > |
June 19, 2002 Re: internal error | ||||
---|---|---|---|---|
| ||||
Posted in reply to anderson | anderson wrote:
> "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 need
>>
> that).
>
>>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.
>
Are < and > supposed to work on arrays yet? I really don't
want to use strcmp()!
-Jon
|
Copyright © 1999-2021 by the D Language Foundation