comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: Positional Aggregates
Date: 1998/11/11
Date: 1998-11-11T00:00:00+00:00	[thread overview]
Message-ID: <72cq2h$7bd$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 72cbru$juh@gcsin3.geccs.gecm.com

In article <72cbru$juh@gcsin3.geccs.gecm.com>,
  John McCabe <john@assen.demon.co.uk> wrote:
> In a declarative part of a subroutine I have lines like the following:
>
>    Files_Used  : constant := 1;
>    Files_Index : array (1..Files_Used) of Integer := (17);
>
> When compiled, I get a warning:
>
>    error: positional aggregate cannot have one component
>
> Is this valid for an array with only one element?

It never worked for me before. Try

    Files_Index : array (1..Files_Used) of Integer := (others => 17);

BTW: That's the best error message for that error I've ever seen.

--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  parent reply	other threads:[~1998-11-11  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-11  0:00 Positional Aggregates John McCabe
1998-11-11  0:00 ` John McCabe
1998-11-12  0:00   ` dewarr
1998-11-12  0:00     ` John McCabe
1998-11-11  0:00 ` Marc A. Criley
1998-11-11  0:00 ` dennison [this message]
1998-11-12  0:00   ` dewar
1998-11-12  0:00     ` John McCabe
1998-11-12  0:00       ` dewarr
replies disabled

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