[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 ??



"Joachim Holst (QCS)" wrote:

> > Der er til gcc faktisk et par options der kan vælge "default" :
> >
> >          -fsigned-char -funsigned-char
> >

Jeg ville helst undgå at bruge implemementations-afhængige compiler
flags! hvis du "caster" det *rigtige* sted (jeg mener at det er din
linie 52?):

 if((unsigned char)tmp >= 161 && (unsigned char)tmp <= 255/*tautologi*/)
&& tmp != 9 && tmp != 13) ... ;

i C++:
if(reinterpret_cast<unsigned char>(tmp) >= 161 &&
reinterpret_cast<unsigned char>(tmp) <= 255/*tautologi*/ && tmp!= 9 &&
tmp != 13) ... ;


BS: "It's meant to be ugly!"


så har du løst problemet!!!

> Finns det liknande flaggor för andra typer så som int ??

Bruger du windows kan du have lyst til at lave samme trik med
reinterpret_cast<unsigned int>.

men tænk lidt over hvilke værdier din *castede* første-operand kan
antage!

> /Jocke!

Hej fra Nils!



 
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] *