TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date: Fri, 5 Feb 1999 11:46:20 -0000
From: Bill Taylor <[log in to unmask]>
Content-Transfer-Encoding: 7bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset="iso-8859-1"
MIME-Version: 1.0
Parts/Attachments: text/plain (41 lines)
Try

1.      type Court_Type (<>) is private;

2     Always_Guilty : constant Court_Type := (2 .. 1 => Open);


regards
Bill Taylor ([log in to unmask])



-----Original Message-----
From: Team Ada: Ada Advocacy Issues (83 & 95)
[mailto:[log in to unmask]]On Behalf Of Rick Duley
Sent: 04 February 1999 08:46
To: [log in to unmask]
Subject: Problems with unconstrained arrays


Hi Teamers,

        Here is a couple of bits of bother with unconstrained arrays which I
have
been able to resolve neither through the study of the Ada95 LRM, the
Rationale nor yet any of the texts in our library.
1.   It doesn't appear to be possible to compile the declaration of an
unconstrained type as either private or limited private.  I haven't been
able to find a prohibition of this in the LRM.  Is this a compiler problem
(GNAT 3.1)?
2.   Try as I might I can't find a way to define a null constant of an
unconstrained array type  -  I expected the syntax to run something like
this:

procedure Trial is

   type Case_Type  is (Open, Shut);
   type Court_Type is array(Positive range<>) of Case_Type;

   Always_Guilty : constant Court_Type := Court_Type(2 .. 1);

ATOM RSS1 RSS2