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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,502eafcf316bcb10 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-16 05:34:52 PST Path: nntp.gmd.de!newsserver.jvnc.net!netnews.upenn.edu!dsinc!spool.mu.edu!howland.reston.ans.net!usc!hookup!olivea!news.hal.COM!decwrl!netcomsv!butch!rapnet.sanders.lockheed.com!rapnet.sanders.lockheed.com!gamache From: gamache@rapnet.sanders.lockheed.com Newsgroups: comp.lang.ada Subject: Re: Ada can't initialize (aggregate) array of length 1? Date: 16 Dec 94 08:34:52 -500 Organization: Lockheed Sanders, Inc. Message-ID: <1994Dec16.083452.1@rapnet.sanders.lockheed.com> References: <1994Dec12.081230.24978@roxi.rz.fht-mannheim.de> <3chim1$6v5@gamma.ois.com> NNTP-Posting-Host: dune.sanders.lockheed.com Date: 1994-12-16T08:34:52-05:00 List-Id: In article <3chim1$6v5@gamma.ois.com>, beckwb@ois.com (R. William Beckwith) writes: > Dirk Zoller (duz@roxi.rz.fht-mannheim.de) wrote: > > : type stone is array (1..2) of character; > : shapes: constant array (1..1) of stone := ("[]"); > > Try: > shapes: constant array (1..1) of stone := (others => "[]"); > > ... Bill This solution, or shapes : constant array (1..1) of stone := (1=> "[]"); is/are the correct one. But I thought your real question was, why doesn't positional notation work for aggregates of length 1? I had no idea and was curious myself, so I stuck your example into our compiler which promptly pointed me to paragraph 4 of the "old" Ada LRM. It says: ... Aggregates containing a single component association must always be given in named notation. Apparently this was carried into Ada95 as well. Thanks for bringing up a new (to me at least) part of Ada. Joe