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=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2ac407a2a34565a9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.218.166 with SMTP id ph6mr3725364pbc.5.1330559495484; Wed, 29 Feb 2012 15:51:35 -0800 (PST) Path: h9ni24661pbe.0!nntp.google.com!news1.google.com!news.glorb.com!news.netfront.net!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Array Help? Date: Wed, 29 Feb 2012 16:51:34 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <10615783-d4a9-4cbd-8971-53ba1100d6a0@b18g2000vbz.googlegroups.com> NNTP-Posting-Host: 97.215.242.167 Mime-Version: 1.0 X-Trace: adenine.netfront.net 1330559494 48368 97.215.242.167 (29 Feb 2012 23:51:34 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Wed, 29 Feb 2012 23:51:34 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-02-29T16:51:34-07:00 List-Id: On 02/29/2012 03:59 PM, Robert A Duff wrote: > Jeffrey Carter writes: > >> My 1st programming job, using FORTRAN 66, dealt with tree-ring data. We >> had data from 1600 to 1970. Calculating the correct array index for a >> year was a rich source of bugs for us; if we'd been able to have the >> lower bounds be 1600 rather than 1 life would have been a lot easier. > > Indeed. In Ada that would be a constrained array. > I was talking about unconstrained arrays. I think if I were doing it in Ada today, I'd have an unconstrained array type, and then create a constrained subtype with bounds determined from the input. But remembering the monolithic, goto-filled crap I coded in those days, there are a lot of things I'd do differently today. -- Jeff Carter "Sir Robin the not-quite-so-brave-as-Sir-Lancelot, who had nearly fought the Dragon of Angnor, who nearly stood up to the vicious Chicken of Bristol, and who had personally wet himself at the Battle of Badon Hill." Monty Python & the Holy Grail 68 --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---