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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a1d2fe1ec5136718 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!news.germany.com!newsfeeder.dynfx.net!weretis.net!newsfeed-fusi2.netcologne.de!news.netcologne.de!newsfeed-hp2.netcologne.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Generic warning Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4858CA3B.7030101@gmail.com> <626i5415pe8s2jekhij85k4algrh9i1jfo@4ax.com> <48591C7C.8050304@gmail.com> Date: Wed, 18 Jun 2008 16:42:23 +0200 Message-ID: <9kpc0dqlpz0w$.u1qnk7e1zznp$.dlg@40tude.net> NNTP-Posting-Date: 18 Jun 2008 16:42:23 CEST NNTP-Posting-Host: 85eb4d26.newsspool1.arcor-online.net X-Trace: DXC=4a[ciNc3\ngPKPPVf;4hUjic==]BZ:afn4Fo<]lROoRa<`=YMgDjhgb;?E3AjS4WPk[6LHn;2LCVn7enW;^6ZC`dIXm65S@:3>oo2j]:?[0 On Wed, 18 Jun 2008 14:32:28 +0000, S�bastien Morand wrote: >> (Newbie qiestion, coming from VHDL, halfway through the Barnes book) >> >> Can you not create a subtype of Positive to reflect that, and declare >> both the array and index using that subtype? > > I can't create a subtype using a parameter. No, no, you mean a *type*. > generic > Order: Positive; > package Test is > -- Can't work since Order is not defined at compile time > type MyType is range 1 .. Order; This would be a type. But you do can create a subtype: subtype Index is range 1..Order; -- This is OK Subtypes can be dynamically constrained. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de