comp.lang.ada
 help / color / mirror / Atom feed
From: "John B. Matthews" <nospam@nospam.com>
Subject: Re: numbers as 'generics' parameters
Date: Fri, 16 May 2008 15:12:29 -0400
Date: 2008-05-16T15:12:29-04:00	[thread overview]
Message-ID: <nospam-BF9CB2.15122916052008@news-server.woh.rr.com> (raw)
In-Reply-To: 514f8014-235d-4f52-aae1-c5b862dd6594@y22g2000prd.googlegroups.com

In article 
<514f8014-235d-4f52-aae1-c5b862dd6594@y22g2000prd.googlegroups.com>,
 Adam Beneschan <adam@irvine.com> wrote:

> On May 16, 10:26 am, "jhc0...@gmail.com" <jhc0...@gmail.com> wrote:
> > C++ allows integers as template parameters, so, for example I can
> > define a vector of size N, and verify at compile time that, say, I
> > don't try the inner product of a 2D (N=2) and 3D (N=3) vectors. On the
> > other hand, I don't have to write separate versions of my code for
> > various vector sizes.
> >
> > 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?
> 
> My recommended approach would be to read what the Ada reference manual
> says about generics.  Sorry to be so harsh, but your above assertion
> ("does not allow anything but types") is so far off base that it
> appears you've just gotten hold of some bad information, and that
> needs to be fixed first.
> 
>                                      -- Adam

Good places to start:

<http://www.adaic.org/standards/95rat/RAThtml/rat95-contents.html>
<http://www.adaic.com/standards/05rat/html/Rat-TOC.html>

John
-- 
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews



  reply	other threads:[~2008-05-16 19:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16 17:26 numbers as 'generics' parameters jhc0033
2008-05-16 17:55 ` Adam Beneschan
2008-05-16 19:12   ` John B. Matthews [this message]
2008-05-16 18:34 ` jimmaureenrogers
2008-05-16 18:57 ` Gautier
2008-05-16 20:52   ` Maciej Sobczak
2008-05-16 23:09     ` Peter C. Chapin
2008-05-17  7:47     ` Dmitry A. Kazakov
2008-05-17 16:29       ` Maciej Sobczak
2008-05-17 17:34         ` Dmitry A. Kazakov
2008-05-18 13:58           ` Maciej Sobczak
2008-05-18 14:52             ` Dmitry A. Kazakov
2008-05-18 20:37               ` Maciej Sobczak
2008-05-19  9:02                 ` Dmitry A. Kazakov
2008-05-19  5:16             ` Ivan Levashew
2008-05-19  8:26               ` Maciej Sobczak
2008-05-16 20:22 ` Jeffrey R. Carter
2008-05-21 15:32   ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox