comp.lang.ada
 help / color / mirror / Atom feed
From: leschkes@ferret.cig.mot.com (Scott Leschke)
Subject: Re: Ada can't initialize (aggregate) array of length 1?
Date: 16 Dec 94 16:41:09 GMT
Date: 1994-12-16T16:41:09+00:00	[thread overview]
Message-ID: <leschkes.787596069@ferret> (raw)
In-Reply-To: 3clobf$r0p@gnat.cs.nyu.edu

dewar@cs.nyu.edu (Robert Dewar) writes:

>"I use GNAT v 2.0 on OS/2"

>really? that's surprising, because GNAT goes out of its way to give
>a clear error message here:

>     1. procedure k is
>     2.     type stone is array (1..2) of character;
>     3.     shapes: constant array (1..1) of stone := ("[]");
>                                                       |
>        >>> positional aggregate cannot have one component

>     4. begin
>     5.    null;
>     6. end;

>and that's exactly right, the fix is to make the aggregate named

>   (1 => "[]")

I was always under the understanding that positional notation was
ambiguous for the length 0 and 1 cases.  If this is so, how can
GNAT display a non-mabiguous messsage?  Is ambiguous too strong a
statement here ?  Maybe that's where I'm confused ?

Scott Leschke
-- 
Scott Leschke



  parent reply	other threads:[~1994-12-16 16:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-12  7:12 Ada can't initialize (aggregate) array of length 1? Dirk Zoller
1994-12-12 12:54 ` Gentle
1994-12-12 18:35   ` Bob Duff
1994-12-13 17:01   ` Jahn Rentmeister
1994-12-14  3:23   ` Robert Dewar
1994-12-12 13:20 ` R. William Beckwith
1994-12-16 13:34   ` gamache
1994-12-14  3:21 ` Robert Dewar
1994-12-16 10:37   ` Dirk Zoller
1994-12-19 14:20     ` Robert Dewar
1994-12-16 16:41   ` Scott Leschke [this message]
1994-12-17 17:52     ` Robert Dewar
replies disabled

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