Topic : sbit and variable declaration

Forum : 8051

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

Hello to all.

I'm using:
Ride7 patch:

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.