Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ncsu.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!mcnc!ncsu!mauney From: mauney@ncsu.UUCP (Jon Mauney) Newsgroups: net.lang.c Subject: Re: Un-alignment in structures Message-ID: <2821@ncsu.UUCP> Date: Wed, 20-Mar-85 11:22:02 EST Article-I.D.: ncsu.2821 Posted: Wed Mar 20 11:22:02 1985 Date-Received: Fri, 22-Mar-85 01:32:28 EST References: <9239@brl-tgr.ARPA>, <120@mit-athena.UUCP> Organization: N.C. State University, Raleigh Lines: 21 When asking for unaligned structures in C, don't forget to ask that they be unaligned at the BIT level, because you might want to read tapes containing 36 or 60 bit words. Also make sure that the compiler supports viewing numbers as having their bytes interchanged, because you might want to go from the VAX to something sane, occasionally. And we want the compiler to convert between ones- and twos-complement, and among the various representations of floating point, both binary and BCD. Why should I have to write a different conversion routine for every pair of machines, when they could all be added to the compiler for me? Of course, the stodgy old standards commitee will never get sufficiently enlightened to add these features to the language. So we'll have to go with the next-best thing: a library of good, generic data-conversion routines. Fortunately, C provides lots of support for writing generic procedures. -- _Doctor_ Jon Mauney, mcnc!ncsu!mauney \__Mu__/ North Carolina State University [ Huh? Put in a :-)? What does that mean?]