From: "Campbell, Rolf [SKY:1U32:EXCH]" Newsgroups: comp.os.msdos.djgpp Subject: Re: Forming a float from 4 seperate bytes Date: Wed, 28 Jul 1999 14:11:29 -0400 Organization: Nortel Networks Lines: 15 Message-ID: <379F47D1.D433939D@americasm01.nt.com> References: <7nku8s$hkl$1 AT nnrp1 DOT deja DOT com> NNTP-Posting-Host: bmerhc00.ca.nortel.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.7 [en] (X11; I; HP-UX B.10.20 9000/712) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Ian Miller wrote: > union both > {int i, float f} u; You could also do: union {char ch[4]; float f;} u; Then you wouldn't have to do any shifting or OR'ing. -- -Rolf Campbell (39)3-6318