Quote:
Originally Posted by Dave Scheck
Kevin, I think you forgot to remove the semicolons after the IFs in your reply. I think you meant it to be
Code:
unsigned char limit(int value)
{
if(value > 255)
value = 255;
else if(value < 0)
value = 0;
return (unsigned char)value;
}
|
Ahh, my devious little plan succeeded and I verified that at least one person is awake and actually reading the programming forum.
Dave, thanks for catching my gaff <grin>.
-Kevin