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,eac70c5fad02d925 X-Google-Attributes: gid103376,public From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) Subject: Re: Concerning subscript bounds checks Date: 1996/07/02 Message-ID: <4ra3p1$b0f@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 163219261 references: <4qdj3e$btf@goanna.cs.rmit.EDU.AU> <4ql9eq$hdt@goanna.cs.rmit.EDU.AU> <4r1aep$7ga@natasha.rmii.com> <4r7r65$nj@goanna.cs.rmit.EDU.AU> organization: Comp Sci, RMIT, Melbourne, Australia keywords: subscripts newsgroups: comp.lang.ada nntp-posting-user: ok Date: 1996-07-02T00:00:00+00:00 List-Id: I wrote: type Coord is ... type Point is array (Coord) of Float; let J be Simplex_Range'Val( Point'Range'Pos(I) - Point'Range'Pos(Point'Range'First)) However, I couldn't figure out any way to code that conversion from I to J. (The immediate problem is that Point'Range is a _range_, not a _(sub)type_, so Point'Range'Pos is inexpressible.) bobduff@world.std.com (Robert A Duff) writes: >What's wrong with "Coord'Pos(I) - Coord'Pos(Point'First)"? I think it was probably too obvious. For some reason, I didn't want to use the name of the index type. I can no longer recall why. -- Fifty years of programming language research, and we end up with C++ ??? Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.