From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,36b12252024e3bc0 X-Google-Attributes: gid103376,public From: dewar@gnat.com Subject: Re: Positional Aggregates Date: 1998/11/12 Message-ID: <72dk3n$tda$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 410968765 References: <72cbru$juh@gcsin3.geccs.gecm.com> <72cq2h$7bd$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x7.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Nov 12 03:19:19 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1998-11-12T00:00:00+00:00 List-Id: In article <72cq2h$7bd$1@nnrp1.dejanews.com>, dennison@telepath.com wrote: > > 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. Thankyou for that nice note! The GNAT circuit for producing this error message is indeed a little tricky, but we found it was a common error and thus worth the effort to special case the error message :-) Strictly of course (17) simply is not an aggregate at all but just a parenthesized expression. What GNAT does here is to specially check for a parenthesized expression of type foo in a context expecting array-of-foo. Robert Dewar Ada Core Technologies -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own