• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa and bit handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa and bit handling


  • Subject: Re: Cocoa and bit handling
  • From: Jiri Volejnik <email@hidden>
  • Date: Tue, 21 Dec 2004 15:24:41 +0100

Oops, it was wrong! Sorry, here is a better version :-)

byte CopyOneBit(byte source, unsigned sourceBit, byte target, unsigned targetBit)
{
byte bit = source & (1 << sourceBit);
byte mask = 1 << targetBit;
return bit ? target | mask : target & ~mask;
}


Jirka

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Cocoa and bit handling (From: "Peter Karlsson" <email@hidden>)

  • Prev by Date: RE: Re: Midisport and sysex
  • Next by Date: Re: Renaming files?
  • Previous by thread: Re: Cocoa and bit handling
  • Next by thread: Fwd: Cocoa and bit handling
  • Index(es):
    • Date
    • Thread