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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3ed9f245566db0d5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-16 11:48:19 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!west.cox.net!cox.net!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3D862764.9010100@acm.org> From: Jeffrey Carter User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Question on arrays References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 16 Sep 2002 18:48:21 GMT NNTP-Posting-Host: 63.184.9.154 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1032202101 63.184.9.154 (Mon, 16 Sep 2002 11:48:21 PDT) NNTP-Posting-Date: Mon, 16 Sep 2002 11:48:21 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:29040 Date: 2002-09-16T18:48:21+00:00 List-Id: prashna wrote: > A_Integer(2) := (others => 2.0); > > where A_Integer is an array of integer, whose index is integer ranging > form 1..10. > > I am using Tartan compiler on Aix machine and the error is > "segmentation fault (core dumped)" That's not a very useful error message. If I read your description of A_Integer correctly, it is declared something like A_Integer : array (1 .. 10) of Integer; or the equivalent with a named array type. In that case, "A_Integer (2)" is an Integer, while "(others => 2.0)" is an aggregate. To simplify, an aggregate can be considered a literal of a composite type. Since the left-hand side is a non-composite type (Integer) and the right-hand side is a value of some composite type (an aggregate), they do not match and the assignment is illegal. I won't go into the difference between "2.0" and "2". If you don't understand that yet, then you need to work through some basic tutorials or texts on Ada before trying what you're working on. -- Jeff Carter "Oh Lord, bless this thy hand grenade, that with it thou mayst blow thine enemies to tiny bits, in thy mercy." Monty Python and the Holy Grail