[Coco] help with C problem
tim lindner
tlindner at ix.netcom.com
Mon Jan 2 12:45:55 EST 2006
Bob Devries <bdevries at gil.com.au> wrote:
> The compiler always gives a warning in line 8: [Warning] comparison is
> always true due to limited range of data type
A char's range is -127 to 128. So the test of (s2 < 128) is _always_
true.
An unsigned char has a range of 0 to 255.
If this is targeted to the CoCo, then I suggest testing if the high bit
is not set, since there is not unsigned char.
--
tim lindner
tlindner at ix.netcom.com Bright
More information about the Coco
mailing list