Topic : sbit and variable declaration

Forum : 8051

Original Post
Post Information Post
August 25, 2010 - 3:34pm
Guest

Hello to all.

I'm using:
Ride7: 7.30.10.0159
RKit51: 3.06.10.0173
Ride7 patch: 7.30.10.0169

Yesterday, I've writted a big mistake.

"sbit _Data_ =P0^0;" in header file.

and a func witch use _Data_ as a local variable (and nothing to see with P0^0)
"void write()"
"{"
"byte _Address_=0,_Data_=0;
"......
"case 0x98: SCON0 = _Data_; break;"
"....
"}"

Compiler don't see any error, is it a bug or a 'portée/range' problem?

BTW: Error corrected anyway.