comp.lang.ada
 help / color / mirror / Atom feed
From: Stuart Palin <stuart.palin@baesystems.com>
Subject: Re: Representation clause for enumeratives
Date: Mon, 12 Feb 2001 09:12:07 +0000
Date: 2001-02-12T09:12:07+00:00	[thread overview]
Message-ID: <3A87A8E7.FA749BC8@baesystems.com> (raw)
In-Reply-To: 95uae3$n5j$1@nnrp1.deja.com

Robert Dewar wrote:
> 
> In article <3A829EB8.A098925E@baesystems.com>,
>   Stuart Palin <stuart.palin@baesystems.com> wrote:
<snip some rubbish code>

> You could try it, but it would of course not compile :-)
<snip compiler response>
> 
> It is always a good idea to try compiling examples before
> you post them. I supposedly know Ada reasonably well, but I
> still find it easy to have a mind-slip now and then, and try
> to follow this discipline myself :-)

I plead guilty to ignoring Robert's oft given advice, and apologize to
the court :-)

I would write out the proper answer 100 times - but I don't think anyone
would like that; however, for the record I provide what I should have
written (checked with XD-Ada [83]).

  type TYP_ENUM is (C,A,B);
    -- NOTICE: 'C' has the lowest value representation and
    --         so must come first.

  for TYP_ENUM use(
     -16#80000000#,  -- NOTICE: the "-"
      16#00000002#,
      16#00000004#);

(other caveats and advice given elsewhere in this thread apply)

--
Stuart Palin



      parent reply	other threads:[~2001-02-12  9:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-08  9:53 Representation clause for enumeratives Sandro Binetti
2001-02-08 10:12 ` Tarjei T. Jensen
     [not found]   ` <95u470$ho1$1@nnrp1.deja.com>
     [not found]     ` <95ua6q$mp4$1@nnrp1.deja.com>
2001-02-08 15:41       ` M. Kotiaho
2001-02-08 16:27         ` Steve O'Neill
2001-02-09  7:26           ` Sandro Binetti
2001-02-09  9:29           ` Martin Dowie
2001-02-08 15:55     ` Marin David Condic
2001-02-08 16:22 ` Rod Chapman
2001-02-10  6:34   ` Robert Dewar
2001-02-12 11:32     ` Rod Chapman
2001-02-08 18:52 ` Greg Bek
     [not found] ` <Ndyg6.1048$y03.96769@news.flash.net>
2001-02-09  5:02   ` Ken Garlington
2001-02-10  6:29     ` Robert Dewar
2001-02-10 16:37       ` Ken Garlington
2001-02-10 17:29         ` Robert Dewar
2001-02-11  1:09           ` Ken Garlington
2001-02-11  5:27             ` Robert Dewar
2001-02-11 12:53               ` Laurent Guerby
2001-02-12  0:24                 ` Robert Dewar
2001-02-12 20:10                   ` Laurent Guerby
2001-02-11 14:50               ` Ken Garlington
2001-02-10 17:31         ` Robert Dewar
2001-02-11  1:09           ` Ken Garlington
2001-02-11  5:28             ` Robert Dewar
2001-02-11 14:50               ` Ken Garlington
2001-02-12  0:30                 ` Robert Dewar
2001-02-12  2:34                   ` Ken Garlington
2001-02-10  6:19   ` Robert Dewar
2001-02-10 11:42     ` David C. Hoos, Sr.
2001-02-10 16:37     ` Ken Garlington
     [not found] ` <3A829EB8.A098925E@baesystems.com>
     [not found]   ` <95uae3$n5j$1@nnrp1.deja.com>
2001-02-12  9:12     ` Stuart Palin [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox