> Well, to my knowledge, CCS C is an Ansi compiler. If so, it should follow the > ansi C spec. This may be true. > IIRC, when doing a comparison between two variables which are not explicitly > cast, they are both converted to the 'next higher' variable, which would be a > signed long. If that was the case, your comparison would be fine. This is _not_ true. In ANSI "C", a comparison of an 'int' and an 'unsigned int' is performed as a 'unsigned int' comparison, _not_ a 'signed long' comparison. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.