Initializing a structured array

Discussion and support of the compiler from ImageCraft for the M8C.

Moderator: richard@imagecraft.com

Initializing a structured array

Postby mikomatik » Sun Sep 22, 2013 5:56 am

Hello,

Imagecraft V8 PRO.

Could someone tell me what's wrong with such a declaration/reservation/initialization?

...
struct ST_TABLE_Pt100
{
BYTE bResistance;
FLOAT fTemperature;
};
...

...
const struct ST_TABLE_Pt100 cstTablePt100[] = {
{ 70, -75,827}, // [0] 70Ω
{ 80, -50,781}, // [1] 80Ω
{ 90, -25,501}, // [2] 90Ω
{100, 0,000}, // [3] 100Ω
{110, 25,686}, // [4] 110Ω
{120, 51,571}, // [5] 120Ω
{130, 77,660}, // [6] 130Ω
{140, 103,958}, // [7] 140Ω
{150, 130,469}, // [8] 150Ω
{160, 157,198}, // [9] 160Ω
{170, 184,152}, // [10] 170Ω
{180, 211,336}, // [11] 180Ω
{190, 238,756}, // [12] 190Ω
{200, 266,419}, // [13] 200Ω
{210, 294,330}, // [14] 210Ω
{220, 322,498}, // [15] 220Ω
{230, 350,928}, // [16] 230Ω
{240, 379,628} // [17] 240Ω
};


!E K:\SOFRASER\NU6392~1\NUMEL_~1\NUMEL_~1\main.c(333): too many initializers
!E K:\SOFRASER\NU6392~1\NUMEL_~1\NUMEL_~1\main.c(334): too many initializers
!E K:\SOFRASER\NU6392~1\NUMEL_~1\NUMEL_~1\main.c(335): too many initializers
... and so on.

Thx,

Michel
mikomatik
Newbie
Newbie
 
Posts: 2
Joined: Sun Sep 22, 2013 5:34 am

Re: Initializing a structured array

Postby mikomatik » Sun Sep 22, 2013 8:02 am

Post closed !

Found the error : "," instead of "." in the floating initializations! Stupid French keyboard! :?
mikomatik
Newbie
Newbie
 
Posts: 2
Joined: Sun Sep 22, 2013 5:34 am


Return to “%s” ImageCraft ICCv7 for M8C Compiler

Who is online

Users browsing this forum: No registered users and 1 guest

cron