Close or Esc Key

Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

operator '==' has no left operand

3 posts / 0 new
Last post
hareesh's picture
Last seen: 10 months 3 weeks ago
Joined: 19/03/2018 - 14:05
operator '==' has no left operand

i wrote a peogram for measuring voltage using pic.but copiled that program i got ths error.

    #if==adcData  \\here am getting that error.
    volt= (((float)adcValue*240.0)/1023.0);


am using ic is dspic30f2010

and the compiler is mplab c30

anyone please help for solving this error.



GANEEV SINGH's picture
Last seen: 1 year 1 month ago
Joined: 22/07/2013 - 16:08
HiThe error is correctly


The error is correctly highlighted by the compiler. This is because if() statement requires a condition to work on and in your case it must be something which when equals to adcData should run the if statement. The error has occured beacuse in above code that something is missing. Perform a dry-run, you will be able to figure it out.

Ashutosh Bhatt
Ashutosh Bhatt's picture
Last seen: 2 months 2 weeks ago
Joined: 21/12/2010 - 15:59
I think you are not familier

I think you are not familier with basics of C programming!!!!!


this does not have any meaning

it must be

if (x == adcdata)     // x can be any value

if statemet in C programming checks boolean condition as true or false