Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!jarthur!dfoster From: dfoster@jarthur.Claremont.EDU (Derek R. Foster) Newsgroups: comp.os.msdos.programmer Subject: Re: Reversing Ints easily in TC++ Keywords: Int, Intel, Motorola Message-ID: <9448@jarthur.Claremont.EDU> Date: 31 Oct 90 03:47:19 GMT References: <1990Oct26.153349.23581@maytag.waterloo.edu> Organization: Harvey Mudd College, Claremont, CA 91711 Lines: 13 In article jdries%doppler@faatcrl (J. Francis Dries, III) writes: >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? In the case of ints, look up the "swab" function. I don't know about longs, though. Derek Riippa Foster