Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!cbmvax!carolyn From: carolyn@cbmvax.commodore.com (Carolyn Scheppner - CATS) Newsgroups: comp.sys.amiga.programmer Subject: Re: 4 bytes to a long? Message-ID: <22408@cbmvax.commodore.com> Date: 13 Jun 91 16:49:05 GMT References: <451.28517f01@beach.gal.utexas.edu> Reply-To: carolyn@cbmvax.commodore.com (Carolyn Scheppner - CATS) Organization: Commodore, West Chester, PA Lines: 17 In article <451.28517f01@beach.gal.utexas.edu> mrimages@beach.gal.utexas.edu writes: > > Is there a fast, simple way to convert 4 bytes into a long? The IFF code has always done it this way: #define MAKE_ID(a,b,c,d) \ ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d)) where a,b,c,and d are characters and the result is a long -- ========================================================================== Carolyn Scheppner -- Tech. Mgr. CATS - Commodore Amiga Technical Support PHONE 215-431-9180 {uunet,rutgers}!cbmvax!carolyn carolyn@commodore.com Calm down. It's just ones and zeros. ==========================================================================