Just an idea ... if memory (waste) isn't an issue, and if you can't (currently) get 16 bits sets with GPC, how about making everything 32 bit instead?
Joe.
-----Original Message----- From: Sven Jauring [SMTP:sven.jauring@hiq.se] Sent: Friday, August 03, 2001 9:22 PM To: Russell Whitaker Cc: gpc@gnu.de Subject: Re: [Fwd: 16 bit sets?]
Hi Russel Thanks for your help, but unfortunatly the pascal code that I'm trying to compile actually deals specifically with sets. (E.g. Variable1.BT := Variable1.BT - [BIT4] + [BIT2]; and so forth...)
Best Regards Sven Jauring
Russell Whitaker wrote:
On Fri, 3 Aug 2001, Sven Jauring wrote:
Hi again!
I need to be able to specify not only 16 bit sizes but also 8 bit and
4
bit sizes as well. Is there anyone out there that could give me a hint of HOW to
implement
the functionality in GPC
Patched your program a little. It *might* be what you're looking for.
type INT0_255 = packed 0..255;
{ BITS = (BIT0,BIT1,BIT2,BIT3, BIT4,BIT5,BIT6,BIT7, BIT8,BIT9,BIT10,BIT11, BIT12,BIT13,BIT14,BIT15); }
bitarray = packed array [ 0..15 ] of integer ( 1 );
var VARIABLE1 : record case shortint of 0: (AWORD: shortint); 1: (MSB: INT0_255; LSB: INT0_255); 2: (BT : bitarray ); end;
begin writeln( sizeof (VARIABLE1)); end.
prints 2 (bytes)
Hopes this helps Russ << File: Card for Sven Jauring >>