GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #6362

Back to main page of archive

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  

From: levi@localhost.nc3a.nato.int
Subject: [Fwd: 16 bit sets?]
Date: 3 Aug 2001, 02:52:30



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

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  


In reply to

Author Subject Date
Sven Jauring [Fwd: 16 bit sets?] 3 Aug 2001, 08:18:31

Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).