Hang on a millisecond.. What is the big deal over int? A signed int should be +3286X to -3276X, and an unsigned int should be 0-65535. Whenever yall discuss converting to -6, that applies to a char or uchar only. The confusion comes in with compilers that have a short int, and or a long which is a 16 not 32 bit variable. So I am still puzzled as to why everyone thinks that a int converts 250 to -6. Someone should look on the variable types page of CCS and find out where they stand. One more time: uchar 8 bit char 8 bit uint 16 bit int 16 bit ulong 32 bit long 32 bit Chris Eddy~ "M. Adam Davis" wrote: > Bob Ammerman wrote: > > 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. > > If so, what is the conversion? You can't represent 250 (or even 128) in a > signed int. I suppose that there is no conversion, it just refers to the uint > as an int, in which case it becomes -6. > > Well, this is a reason for good coding practices. Always cast variables when > they are dissimilar... Portability is better then, as well. > > -Adam > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST