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

Mail #5303

Back to main page of archive

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

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

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 and some kind of estimation of how long TIME it
would take?

Best Regards
Sven Jauring

-------- Original Message --------
Subject: 16 bit sets?
Date: Tue, 31 Jul 2001 16:34:50 +0200
From: Sven Jauring <sven.jauring@hiq.se>
To: gpc@gnu.de

Hi,


I'm working in a project, where I need to compile old pascal code using
GPC (beta 20010201).

The code is scattered with variable types, that depends on bit
correlations in unions.
E.g:
********************************
type
  INT0_255 = packed 0..255;

  BITS = (BIT0,BIT1,BIT2,BIT3,
          BIT4,BIT5,BIT6,BIT7,
          BIT8,BIT9,BIT10,BIT11,
          BIT12,BIT13,BIT14,BIT15);

var
  VARIABLE1 : record case int16 of
                0: (WORD: INTEGER);
                1: (MSB: INT0_255;
                    LSB: INT0_255);
                2: (BT : set of BITS);
              end;

*********************************
In order for this declaration to function properly, I seem to need the
possibility to specify 'BT' to be just 16 bits, and not 32 bits, which
seems to be default.

I tried to find out from the manual if this is possible. I found the
following passages:
"The Extended Pascal features still missing from GPC are ..., set types
with variable bounds, ..."
and "Planned features: Other types... *sparse sets; sets of arbitrary
types ?? ???"

For me, this is pretty deep water, so I won't take offence if you tell
me to RTFM, but never the less...
My question is this: Can it be done in the latest release (20010623) or
should I wait for someone to implement this feature?

Best Regards
Sven Jauring

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


Replies

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

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).