This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

good code bad answer

my code is 110% correct; eg no errors and runs properly. see.

int _val;

int myfunc2(int val)
{
  _val = val;
   return _val;
};

int Bar(int val)
{
  return _val + val + 1;
};

void myfunc1(int val)
{
  _val += Bar(val);
};

etc
etc
etc

it doesnt give me the right answer sometime.

HEEEEEEEELLLLLLLPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP

Parents
  • "Remember that datasheet limits just tell you where the behaviour & performance is guaranteed; they tell you nothing about the behaviour & performance outside those limits - other than that it is undefined.

    "Undefined" means that anything could happen - including appearing to work for 10 years, and then "suddenly" not working..."

    are you suggesting that the "slow" speed at which the cpu was running is outside of the spec defined in the datasheet?

    or you are speculating on that? as the poster clearly didn't provide that piece of information.

Reply
  • "Remember that datasheet limits just tell you where the behaviour & performance is guaranteed; they tell you nothing about the behaviour & performance outside those limits - other than that it is undefined.

    "Undefined" means that anything could happen - including appearing to work for 10 years, and then "suddenly" not working..."

    are you suggesting that the "slow" speed at which the cpu was running is outside of the spec defined in the datasheet?

    or you are speculating on that? as the poster clearly didn't provide that piece of information.

Children