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=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca.giganews.com!nntp.giganews.com!news.bbs-scene.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: need help learning Ada for a modula-2 programmer Date: Wed, 29 Jan 2014 16:52:24 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <878utybjxc.fsf@adaheads.sparre-andersen.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 29 Jan 2014 23:52:26 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="6bab1dce10a849dba13303bd95a0f77d"; logging-data="22063"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX194dha9vObupB9xC3RO/oZ0a3e1TNuyFVU=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <878utybjxc.fsf@adaheads.sparre-andersen.dk> Cancel-Lock: sha1:9wDlAU+VYCWhyclNYNXXoJY6rN0= Xref: number.nntp.dca.giganews.com comp.lang.ada:184594 Date: 2014-01-29T16:52:24-07:00 List-Id: On 01/29/2014 01:41 PM, Jacob Sparre Andersen wrote: > > Generalising the array index beyond type Integer takes up ten lines in > my first take on the task. (Recursion _might_ make it shorter.) Mine is the same number of lines whether the index is numeric or not. 2 of the lines differ to handle non-numeric indices. -- 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