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=2.0 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1ce0ce3b2db00698 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.190.104 with SMTP id gp8mr16886997pbc.4.1340720672780; Tue, 26 Jun 2012 07:24:32 -0700 (PDT) Path: l9ni22239pbj.0!nntp.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: how to print an array range? Date: Tue, 26 Jun 2012 09:24:30 -0500 Organization: Aioe.org NNTP Server Message-ID: References: <4fe9bf33$0$6566$9b4e6d93@newsspool4.arcor-online.net> Reply-To: nma@12000.org NNTP-Posting-Host: KdJUrTuvv3Zv/s8pPxNluw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-06-26T09:24:30-05:00 List-Id: On 6/26/2012 9:08 AM, Nasser M. Abbasi wrote: ... > put(A'First(1)); new_line; > put(A'Last(1)); > > end foo1; > ---------------------------- > >> gnatmake foo1.adb > gcc-4.6 -c foo1.adb > gnatbind -x foo1.ali > gnatlink foo1.ali >> ./foo1 > -2147483648 > -2147483646 I think I know what these numbers are. Look like Integer'first. But I wanted to see the range of the first dimension of the Matrix A below. (1..3, 1..3) ---------------------------------- with Ada.Text_Io; use Ada.Text_Io; with Ada.Float_Text_Io; use Ada.Float_Text_Io; with Ada.integer_Text_Io; use Ada.integer_Text_Io; with Ada.Numerics.Real_Arrays; use Ada.Numerics.Real_Arrays; procedure foo1 is A : constant Real_Matrix := (( 1.0, 2.0, 3.0), ( 4.0, 5.0, 6.0), ( 7.0, 8.0, 9.0)); begin put(A'First(1)); new_line; put(A'Last(1)); end foo1; ------------------------------- I think I Will go hunt for a book on Ada, and will look at the packages Dmitry just posted. thanks, --Nasser