#75 Compiler error with certain variable names.

compiler
closed-fixed
John Hansen
NXC (53)
5
2009-12-01
2009-11-11
Anonymous
No

I define the structure
struct Struct_algo
{
int last_area;
int multl;
int constl;
int diffl;
int multr;
int constr;
int diffr;
};
Struct_algo algo;
Then I put data in the variables with

algo.multl = message[1];
algo.constl = message[2];

and so on. (message is a string)

Compiler outputs:
Error: Invalid variable argument: algo.multo
File "/home/aelg/live5.nxc" ; line 212
# mov algo.multo, __D0bluetooth

Then i change the structure to
struct Struct_custom
{
int last_area;
int g;
int h;
int i;
int j;
int k;
int l;
int m;
};
Struct_custom custom;

which is just changing the names of variables and everything works fine.

Seems a bit strange to me.

It also didn't work with a few other names all of them had either mult diff or const somewhere in them, might have something to do with that?

Discussion

  • John Hansen
    John Hansen
    2009-12-01

    • labels: --> NXC
    • milestone: --> compiler
    • assigned_to: nobody --> afanofosc_99
    • status: open --> closed-fixed
     
  • John Hansen
    John Hansen
    2009-12-01

    Fixed in the test release uploaded on 11/30/2009.