TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: Bill Dickhaus 70325,523 (X)
from: Bob van der Poel 76510,2203
date: 1992-12-14 20:31:41
subject: #17255-C question

#: 17256 S3/Languages
    14-Dec-92  20:31:41
Sb: #17255-C question
Fm: Bob van der Poel 76510,2203
To: Bill Dickhaus 70325,523 (X)

Bill, hope we're not working on the same project . I had to something which
I think is what you are asking. Code like:

 struct {
   char sc;
   int si;
   char *spc;
 }teststruct;

 char *test=&teststruct.spc;

Does produce the correct results with the 68K compiler. Don't know about the
6809... Oh, and remember that the above is NOT the best way to structure the
structure. 3 padding bytes are inserted inbetween 'sc' and 'si' for alignment.
You're best off to put the chars and shorts at the end of the structure. Mixing
chars and ints really eats up lots of memory when using structures.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.