C18 comparison bug?
PICdude email (remove spam text)
Quoting Mark Rages <gmail.com>:markrages
> On Tue, Jan 24, 2012 at 4:27 PM, PICdude <narwani.org> wrote: picdude3
>> Hmmm... still tinkering with C18 and ran into this oddity...
> How is "S2" declared? If it is an int8_t (aka char) then 125+5 =
> -126, which is always going to be less than S2_MIN, so S2 will remain
> at 90.
"unsigned int", because the full range of values will be 0 to 350.
In reply to: <CAASrBQmJjr+AMrV3OTo3pw5mos1X4ay+KWXktRdYsg5_BvKecg@mail.gmail.com>
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the