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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no 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 05:29:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!208.49.253.98!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Question on arrays Date: Mon, 16 Sep 2002 08:08:09 -0400 Organization: MindSpring Enterprises Message-ID: References: NNTP-Posting-Host: d1.56.b5.b9 X-Server-Date: 16 Sep 2002 12:08:34 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Xref: archiver1.google.com comp.lang.ada:29017 Date: 2002-09-16T12:08:34+00:00 List-Id: That depends a lot on how A_Integer is declared. For one thing, when you are de-referencing the array, you are talking about an object of its component type, not an array, so the "(others =>...)" aggregate is probably inappropriate. (A_Integer (2) probably references an object of type "Integer" - which is not an array and to which you can't assign an aggregate - but we'd have to see the declaration.) Secondly, *if* the array is composed of objects of type Integer, then the aggregate references a constant of type Unversal Real - which is a type mismatch. (2.0 is not the same as 2 - at least in Ada context). So you might get: A_Integer (2) := 2 ; to work Or possibly you might get: A_Integer (2..3) := (others => 2); to work (because now it is an array slice). Post a bit more code if this doesn't explain it. MDC -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jast.mil/ Send Replies To: m c o n d i c @ a c m . o r g "I'd trade it all for just a little more" -- Charles Montgomery Burns, [4F10] ====================================================================== prashna wrote in message news:d40d7104.0209160302.3a15485e@posting.google.com... > Hi all, > Pls explain what is wrong in this statement? > > 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)" > Thanks in Advance.