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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4ff929aa5c2b2834 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!kanaga.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Ranges and (non)static constraints Date: Fri, 17 Nov 2006 16:45:52 +0100 Organization: CERN News Message-ID: References: <1pqs0gcno5o2t.1195tm9yap28b.dlg@40tude.net> NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: cernne03.cern.ch 1163778352 2191 137.138.37.241 (17 Nov 2006 15:45:52 GMT) X-Complaints-To: news@@cern.ch NNTP-Posting-Date: Fri, 17 Nov 2006 15:45:52 +0000 (UTC) User-Agent: Thunderbird 1.5.0.8 (X11/20061113) In-Reply-To: Xref: g2news2.google.com comp.lang.ada:7531 Date: 2006-11-17T16:45:52+01:00 List-Id: Jean-Pierre Rosen wrote: > 2) You want a "reasonable" type, given the capabilities of the machine. > Either derive from Integer, or use Integer directly (not a bad choice > for vector or matrix indices for example). That's what String did. But > in that case, there is no reason to put an additional range constraint. > What I was objecting to is putting a range on a derivation from Integer. Then imagine that the following apply (both): 1. I want a "reasonable" type (matrix indices or even... strings), which will play nice with the underlying machine architecture. 2. I want a named subtype with dynamically determined constraints so that I can use this named subtype in subsequent array definitions, loops, etc. With such assumptions, the following: type T is new Integer range 1..N; seems reasonable, right? -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/