Path: utzoo!attcan!uunet!nih-csl!lhc!ncifcrf!haven!aplcen!samsung!cs.utexas.edu!sun-barr!rutgers!faatcrl!doppler!jdries From: jdries%doppler@faatcrl (J. Francis Dries, III) Newsgroups: comp.os.msdos.programmer Subject: Reversing Ints easily in TC++ Keywords: Int, Intel, Motorola Message-ID: Date: 26 Oct 90 04:54:29 GMT Organization: Only Posers Wear Black Productions Lines: 19 I was hacking up a program to convert Sun Rasterfiles to GIF files when I ran into a little problem. Almost all the non-Intel world (or so I'm told) writes ints MSByte first, whereas Borland's TC++ is reading/writing ints/longs (I need longs, since I'm working with 32bit ints from the Sun) LSByte first. My Question is, is there a way to reverse the order, quickly or cleanly? I could read in each char at a time and OR it onto the long and SHL all 4 on, but that seems kinda sloppy to me. I would think that the is a flag that can be set, or at least a built in macro... Any ideas? --- J. Francis Dries, III ...!rutgers!faatcrl!doppler!jdries jdries%doppler@faatcrl "You can put a bullet in my head, but you can't kill a word I said" -- Mike Muir