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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e511f3ccb3da24af X-Google-Attributes: gid103376,public From: Kilgallen@eisner.decus.org.nospam (Larry Kilgallen) Subject: Re: How to make like Fortran "do i = 1,20,2" Date: 2000/07/27 Message-ID: #1/1 X-Deja-AN: 651564876 References: <8lpcbe$40n$1@news.uit.no> <39805669.3E7CF6CF@lmtas.lmco.com> X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 964732023 216.44.122.34 (Thu, 27 Jul 2000 21:07:03 GMT) Organization: LJK Software NNTP-Posting-Date: Thu, 27 Jul 2000 21:07:03 GMT Newsgroups: comp.lang.ada Date: 2000-07-27T00:00:00+00:00 List-Id: In article <39805669.3E7CF6CF@lmtas.lmco.com>, Gary Scott writes: > Hmmm, these and similar examples posted do not make Ada look very > elegant...it makes a very simple concept seem somewhat convoluted. > > Larry Kilgallen wrote: Well _mine_ may have looked convoluted, but the one from Des Walker was spot on. The original Fortran was dealing with groups of two but not grouping them and instead coding a solution more like machine language. It is possible to write Fortran in Ada, but you shouldn't. > Often wanting to process data in this manner would suggest that there > might be a more meaningful way to express the structure of the data. > A lot of effort can be spent in Ada designing good data types which > makes it simple to write safe code. > > If the two element blocks of your array hold, say, a coordinate pair > you might have > > type coordinate is record > X,Y : integer; > end record; etc.