From: Sean Proctor Newsgroups: comp.os.msdos.djgpp Subject: Re: Bits Message-ID: References: <395B6071 DOT 19052 DOT 12454BB AT localhost> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 21 Date: Fri, 30 Jun 2000 05:50:36 GMT NNTP-Posting-Host: 207.16.153.80 X-Complaints-To: Abuse Role , We Care X-Trace: monger.newsread.com 962344236 207.16.153.80 (Fri, 30 Jun 2000 01:50:36 EDT) NNTP-Posting-Date: Fri, 30 Jun 2000 01:50:36 EDT Organization: ENTER.net (enter.net) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Thu, 29 Jun 2000 14:42:57 +1000, Leon AT caresystems DOT com DOT au wrote: >On 29 Jun 2000, at 3:56, Sean Proctor wrote: > >> ch; char bits1 = ch >> 7; >> >> I believe that works... >> > >only on systems where 1 byte=8 bits (not >always indeed) >the C strandard guarantees the sizeof(char) be >always 1 byte >BUT there is no C strandard to guarantee that 1 >byte is always made up from 8 bits. > >With best regards - Leon. well, as I personally know no one that uses a system where a byte is not 8 bits, I think it's a pretty safe bet. ;) Sean