[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Bugg eller feature ??



On Thu, 20 Apr 2000, Joachim Holst (QCS) wrote:

> Hej !
> 
> Har knappat ihop ett litet program som skall bli lite större.
> 
> Tyvärr, så har jag kompileringsproblem med det. gcc påstår följande:
> test.c:52: Warning: comparison is always 0 due to limited range of data type.
> test.c:52: Warning: comparison is always 1 due to limited range of data type.
> 
> I mina ögon så ser det hela rätt ut på rad 52. Om man skriver som ajg har gjort på rad 51, så
> kompilerar det som det skall. Tycker att det är konstigt att jag skall behöva typa en konstant
> som överstiger 127 till char om jag skall använda det för att jämföra ett char värde..
> 
> Någon som kan förklara detta ??

Kan det være at du skal bruge "unsigned char". En char har vel fortegn, og
værdien "161" kan ikke være i en 8 bit char.

Mads

-- 
Mads Bondo Dydensborg.                               sslug@sslug
Estimates of online gamers in the United States alone run as high as 15 to
20 million people. 
                                      - Jon Katz, Slashdot, on youth culture.



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *