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,f30ef262af690ce0 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s21.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: numbers as 'generics' parameters References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <42mXj.166735$yE1.38263@attbi_s21> NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1210969344 12.201.97.213 (Fri, 16 May 2008 20:22:24 GMT) NNTP-Posting-Date: Fri, 16 May 2008 20:22:24 GMT Organization: AT&T ASP.att.net Date: Fri, 16 May 2008 20:22:24 GMT Xref: g2news1.google.com comp.lang.ada:117 Date: 2008-05-16T20:22:24+00:00 List-Id: jhc0033@gmail.com wrote: > > As far as I can tell, Ada does not allow anything but types as > generics parameters, so what would be the approach to use with it? ARM 12.1 (http://www.adaic.org/standards/05rm/html/RM-12-1.html) lists 4 kinds of generic formal parameters, only one of which is a type. So you clearly haven't done much investigation of Ada. In addition to a generic formal parameter, you can have various subtypes of an unconstrained array type, or a discriminated record type with an array component constrained by the discriminant, to achieve similar things. -- Jeff Carter "You me on the head hitted." Never Give a Sucker an Even Break 108