Be careful: >typedef struct recpack_t { > unsigned int abc: 8; > unsigned int def: 8; > } recpack_t; Does _not_ ensure byte ordering the same as: typedef struct recpack_t { unsigned char abc; unsigned char def; } recpack_t; Bob Ammerman RAm Systems ----- Original Message ----- From: "Robert Reimiller" To: Sent: Monday, June 30, 2003 7:31 PM Subject: Re: [PIC]: Editor comments On Mon, 30 Jun 2003 14:01:52 -0400, you wrote: >Where did "byte" come from? Pascal does not guarantee a data type named >"byte". You need to be more specific and define "byte". > As others have said, Borland (and OmegaSoft) Pascal define byte to be unsigned 8 bits, which of course, makes perfect sense. > Funny, I never thought of that :) I checked that option out with the ADSP-218x compiler, and it does indeed generate identical code as my far less elegant conversion. That's pretty cool if your convertor will do that transformation automatically, I'm pretty sure the one I used couldn't. I suppose in the end it will come down to whether we will be trying to maintain both platforms, in which case it may make sense to try to use one codebase for both, one translated, one not. If, on the other hand, he plans on dropping support for the old hardware, he may want me to just convert to C and be done with it. If that's the case, I'll certainly make my life easier and use the bitfields. Bob (definately not a C expert!) -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu