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,194f7a105da14a4c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-08-19 07:38:29 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!rcn!dca1-feed2.news.algx.net!dca1-feed1.news.algx.net!allegiance!dca1-nnrp1.news.algx.net.POSTED!not-for-mail From: steveo Organization: ... User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: What is happening Here?Totally clueless References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <9Cq0b.474$nA5.106926@dca1-nnrp1.news.algx.net> Date: Tue, 19 Aug 2003 14:36:53 GMT NNTP-Posting-Host: 216.120.49.221 X-Complaints-To: abuse@algx.net X-Trace: dca1-nnrp1.news.algx.net 1061303813 216.120.49.221 (Tue, 19 Aug 2003 10:36:53 EDT) NNTP-Posting-Date: Tue, 19 Aug 2003 10:36:53 EDT Xref: archiver1.google.com comp.lang.ada:41718 Date: 2003-08-19T14:36:53+00:00 List-Id: prashna wrote: > Hi all, > Have a look at the following program, > with text_io; > use text_io; > procedure TEST is > type array_unconstrained is array(integer range <>) of integer; > subtype array_local is array_unconstrained(1..10); > array1 : array_local; > begin > > array1 := (others => 0); > array1(1..2) := array_local'(others => (2)); Warning: line 10 col 20 LRM:11.5(15), Static index lengths do not match Constraint_Error will be raised Warning: line 10 col 20 LRM:11.5(9), Length check will fail at run-time, exception will be raised > ^^^^ can anybody what exactly is this?why they > are not assigning directly to 2 without doing this(Typecast????) > put_line(Integer'image(array1(2))); > put_line(Integer'image(array1(3))); > end TEST; > > When I execute a constraint error is being raised.Can any body explain > what is going on here. > Thanks in advance,