[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] bitskifte !



On Wed, 1 Sep 1999, Erwin S. Andreasen wrote:

> On Wed, 1 Sep 1999, Joachim Holst wrote:
> 
> > Hejsan !
> > 
> > Det finns en liten operator som heter =~. tyvärr, så har jag ine kommit
> > fram til lvad den gör. Någon som kan hjälpa till med ett exempel eller två
> 
> øh, den findes ikke i C, er du sikker på du ikke mener Perl?

Visade det för min lärare och han jämställer Perl med HTML. Personligen,
så har jag ingen erfarenhet av Perl..

> 
> ~ i C vender bitsene på et tal, so du kan sige X = ~Y (men = og ~ er altså
> helt seperate her).
> 
> Oftest benytter man den i sammenhæng som:
> 
> #define BIT 1 << 10 
> bits &= (~BIT)
> 
> Hvor man altså and'er med alle bits udover BIT, som så sætter BIT bitten
> til 0.
> 

Detta stämmer väl fullt ut, men när har man nytta utav den ??
Hade varit bra med ett exempel på detta med. Finns visst inte mycket i
böckerna... :-(

/Jocke!

------------------------------------------------------------------

***   Linux... The choice of a thinking generation ***
      e-mail: sslug@sslug

------------------------------------------------------------------




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 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] *