G
Gary Wessle
Hi
often I need to read numbers and only keep the highest or lowest.
so I do something like
int uLimit = 0;
int lLimit = 999999999999; //hoping the compiler will not complain
uLimit = val_read > uLimit ? val_read : uLimit;
lLimit = val_read < lLimit ? val_read : lLimit;
how do I choose the original lLimit?
is there more cleaver way?
thanks
often I need to read numbers and only keep the highest or lowest.
so I do something like
int uLimit = 0;
int lLimit = 999999999999; //hoping the compiler will not complain
uLimit = val_read > uLimit ? val_read : uLimit;
lLimit = val_read < lLimit ? val_read : lLimit;
how do I choose the original lLimit?
is there more cleaver way?
thanks