- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- error 1523: Too many initializers.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2011 12:43 AM
03-03-2011 12:43 AM
error 1523: Too many initializers.
Could you help me with this error??
char *descripcion_errorcd_2 [] = {
"",
"",
"",
"Deal successfully logged in STAR ",
"Deal exceeded clients credit line in STAR ",
"ERROR trading with STAR ", /* 5 */
"WARNING: Deal logged in STAR. Not all blocking operations cancelled ",
/* otros mensajes para IFOPE y algunas del LOG*/
"IFJ73100 Error al descontratar ope_nu es 0 ",
"IFJ73100 Error al descontratar: %d ",
"Operacion Rechazada",
"IFJ73100 Error rellenando estructuras para contratar", /* 10 */
"IFJ73100 Error en la contratacion de la operacion: %ld ",
"IFJ73100 Error en consulta de estado del mercado", // "Error consulting currency market"
"IFJ73100 Mercado deshabilitado", // "Currency Market disabled"
"IFJ73100 Error al liberar la operacion: %ld , %ld",
"Operacion liberada en STAR", /* 15 */
"IFJ73100 Error en la contratacion del plazo: %ld ",
"IFJ73100 Error en la contratacion spot: %ld ",
"IFJ73100 Error de BBDD en la contratacion",
"IFJ73100 Error al confirmar la operacion: %ld ",
"Operacion confirmada en STAR",/*20*/
"Error en la obtencion del producto",
"Error al realizar ROLLBACK/COMMIT en la confirmación",
"Error al realizar ROLLBACK/COMMIT en la liberación",
"",
"Operacion confirmada en Excedido", /*25*/
"Operacion liberada en Excedido"
};
- Tags:
- initializers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2011 01:57 AM
03-03-2011 01:57 AM
Re: error 1523: Too many initializers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2011 05:02 AM
03-03-2011 05:02 AM
Re: error 1523: Too many initializers.
*descripcion_errorcd_2[]
with:
*descripcion_errorcd_2[27]
And it should work for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2011 07:01 AM
03-03-2011 07:01 AM
Re: error 1523: Too many initializers.
char *descripcion_errorcd_2 [] = {
"",
"",
"",
"Deal successfully logged in STAR ",
"Deal exceeded clients credit line in STAR ",
"ERROR trading with STAR ", /* 5 */
"WARNING: Deal logged in STAR. Not all blocking operations cancelled ",
/* otros mensajes para IFOPE y algunas del LOG*/
"IFJ73100 Error al descontratar ope_nu es 0 ",
"IFJ73100 Error al descontratar: %d ",
"Operacion Rechazada",
"IFJ73100 Error rellenando estructuras para contratar", /* 10 */
"IFJ73100 Error en la contratacion de la operacion: %ld ",
"IFJ73100 Error en consulta de estado del mercado", // "Error consulting currency market"
"IFJ73100 Mercado deshabilitado", // "Currency Market disabled"
"IFJ73100 Error al liberar la operacion: %ld , %ld",
"Operacion liberada en STAR", /* 15 */
"IFJ73100 Error en la contratacion del plazo: %ld ",
"IFJ73100 Error en la contratacion spot: %ld ",
"IFJ73100 Error de BBDD en la contratacion",
"IFJ73100 Error al confirmar la operacion: %ld ",
"Operacion confirmada en STAR",/*20*/
"Error en la obtencion del producto",
"Error al realizar ROLLBACK/COMMIT en la confirmación",
"Error al realizar ROLLBACK/COMMIT en la liberación",
""
};
char *descripcion_error_excedido [] = {
"Operacion confirmada en Excedido",
"Operacion liberada en Excedido"
};
P.S.: i tried with that too:
char *descripcion_errorcd_2 [26]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2011 07:18 AM
03-03-2011 07:18 AM
Re: error 1523: Too many initializers.
Ok, but what's the _right_ answer?
> [...] you're trying to use an initializer
> on an unallocated array.
Really? I didn't think that C was that lame.
> Hi, i can't understand the problem in my
> code...
Neither can I, but with my weak psychic
powers, I can't be sure what "my code" really
is, nor can I see which compiler you're
using, or how. I pasted your posted array
declaration into an example program, and it
seems to work for me on some non-HP-UX
systems which I have up at the moment:
alp $ type 1471496.c
#include
int main( int argc, char ** argv)
{
char *descripcion_errorcd_2 [] = {
"",
"",
[... all of that stuff...]
"Operacion confirmada en Excedido", /*25*/
"Operacion liberada en Excedido"
};
printf( " err[ 15]: >%s<.\n", descripcion_errorcd_2[ 15]);
return 0;
}
alp $ cc /version
HP C V7.3-009 on OpenVMS Alpha V8.3
alp $ cc 1471496.c
alp $ link 1471496
alp $ run 1471496
err[ 15]: >Operacion liberada en STAR<.
ra> uname -a
SunOS ra 5.10 Generic_141444-09 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
ra> cc -V
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12
[...]
ra> gcc --version
gcc (GCC) 3.4.6
[...]
ra> cc -o 1471496 1471496.c
ra> ./1471496
err[ 15]: >Operacion liberada en STAR<.
ra> gcc -o 1471496g 1471496.c
ra> ./1471496g
err[ 15]: >Operacion liberada en STAR<.
I don't have a genuine HP C compiler, but, so
far as I can see, everybody loves _my_
program.
If you attach an actual test case next time,
then perhaps one of us non-psychics could
figure out what's happening at your end.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2011 07:49 AM
03-03-2011 07:49 AM
Re: error 1523: Too many initializers.
Regards and thx.
P.S.:
> [...] you're trying to use an initializer
> on an unallocated array.
I tried other posibilities because the first array declaration didn´t work and i thought this declaration should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2011 08:24 AM
03-03-2011 08:24 AM
Re: error 1523: Too many initializers.
So, fix the problem(s).
> You are right, [...]
Who's right? About what?
> [...] the compiler that i have been used is
> a HP C/HP-UX compiler [...]
Within rather broad limits, C is C. Three
different compilers all liked _my_ example
program. I still haven't seen _your_ example
program.
> [...] (i can't see the exact version
> because i use an rare aplication to
> compile).
So, I don't really know what you're trying to
compile, and I don't really know how you're
trying to compile it. How much help were you
expecting to get?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2011 10:28 AM
03-03-2011 10:28 AM
Re: error 1523: Too many initializers.
You might want to also explain what you did. With all those lines it's hard to see you split the array.
One way to get 1523 is to declare the array with a smaller dimension first:
char *descripcion_errorcd_2[25];
char *descripcion_errorcd_2[] = { ...
Create a .i file and scan for that variable: -E -.i
Or insert the actual dimension (or just use 1000) and see if the compiler will tell you the location of the conflicting shorter declaration.
> can't see the exact version
Just use "cc -V".
>mvpel: The short answer is that you're trying to use an initializer on an unallocated array.
As Steven said, that's not how C works. C allows programmers to leave out the dimension and the compiler will calculate it.
So the real short answer is to look for conflicts in the declaration of the variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2011 01:50 AM
03-04-2011 01:50 AM
Re: error 1523: Too many initializers.
char *descripcion_errorcd_2[25];
char *descripcion_errorcd_2[] = { ...
If you do this, the error message points to the line with the index larger the the dimension:
error #2146: too many initializer values
"Operacion confirmada en Excedido", /*25*/