Q: If statement is skipped I have a very interesting problem come up while programming in MPLAB IDE v8.92.
This is just a snipit of the code but this is where the problem is occuring:
struct data
{
  INT32 value;
};

struct data array[8] = {{0},{0},{0},{0},{0},{0},{0},{0}}; 
INT32 IOC[8];
INT32 IOD[8];


for ( byte i = 0; i<8; i++)
{
#ifdef DAC
  IOC[i] = 0;
  IOD[i] = 24;
  if(array[i].value == 0) array[i].value == 1;
#endif
}

The code builds with no errors and when I step through this part of the code using a ICD 3 debug, IOC and IOD are assigned correctly but the if statement is skipped! i.e. the debugger does not even stop on it.  Any ideas what might have happened?

A: Always compile with -Wall -Werror.  Your statement would have been flagged at compile time:  warning: statement with no effect [-Wunused-value]

A: Thanks to everyone who helped out.  Turns out I wrote the code correctly on the forum the first time but did not correct it in my code.  I edited the question to show the mistake.
  if(array[i].value == 0) array[i].value == 1;

should be:
if(array[i].value == 0) array[i].value = 1;

Guess that's what I get for staring at a screen all day XD
