Path: utzoo!utgpu!water!watmath!dalcs!garfield!john13 From: john13@garfield.UUCP (John Russell) Newsgroups: comp.sys.amiga Subject: Re: Byte/word/long alignment Message-ID: <4383@garfield.UUCP> Date: 14 Jan 88 23:04:23 GMT References: <4366@garfield.UUCP> <4974@well.UUCP> Reply-To: john13@garfield.UUCP (John Russell) Distribution: na Organization: Memorial University of Newfoundland, St. John's Lines: 23 In article <4974@well.UUCP> ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) writes: >In article <4366@garfield.UUCP> john13@garfield.UUCP (John Russell) writes: [ accessing bytes in an array as longs ] > Why don't you simply create it as an array of longwords, then access >it as bytes with a coerced pointer? >ULONG foo[] = { 1, 2, 3, 4, 5, ...n }; Um, not ideal since the data makes much more sense as bytes -- it's bitmapped definitions for the character set, and it helps to be able to check the accuracy of the definitions visually (or at least it did when I was debugging that section). I like to keep data in the most easily-interpreted form possible, such as the binary-constant macros that I posted and use for things like single-plane gadgets. John PS I ended up using a union, 8 bytes or 2 longs. -- "Let's get those teabags outta here and replace them with some REAL Americans!" -- (Canadian) Paul Schaeffer has members of the British nobility physically ejected from the Late Night crowd