comp.lang.ada
 help / color / mirror / Atom feed
From: Reinert Korsnes <Reinert.Korsnes@ffi.no>
Subject: Re: (elementary question) Test on type ?
Date: Thu, 6 Sep 2001 11:36:57 +0200
Date: 2001-09-06T11:36:57+02:00	[thread overview]
Message-ID: <9n7gg7$bke$1@snipp.uninett.no> (raw)
In-Reply-To: Xl5l7.3178$4z.4915@www.newsranger.com

Ted Dennison wrote:

> In article <9n2ctk$36v$1@snipp.uninett.no>, Reinert Korsnes says...
>>
>>Jacob Sparre Andersen wrote:
>>> Seriously, what are you trying to do?
>>
>>Just do a bit different things in the function depending on the type
>>of X.   Say, X is Float of Interger....
> 
> But you can't specify such a parameter, unless you are working with
> generics (is that it?).
> 
> Again, what exactly are you trying to do? Or, is this entirely
> theorietical?

Well, I run into some logic problems which I actually solved
by something -simplified - like (overloading):

generic 
  type T is (<>);
  with function F(X : T) return Float;
procedure P(A : some type; B : another type; X : T);

function F(X: some anumeration type) returns Float;
function F(X: another enumeration type) returns Float;

and:

procedure P1 is new P(T => simething,F);

Someone called John McCabe gave me the hint (in this interesting
discussion).  Thanks...

reinert

PS: Yes, call me "newbie" :-)



> 
> ---
> T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
>           home email - mailto:dennison@telepath.com
> 

http://home.chello.no/~rkorsnes



  parent reply	other threads:[~2001-09-06  9:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-04  8:41 (elementary question) Test on type ? Reinert Korsnes
2001-09-04  9:18 ` David C. Hoos, Sr.
2001-09-04  9:29   ` Reinert Korsnes
2001-09-04 11:02     ` Jacob Sparre Andersen
2001-09-04 11:05       ` Reinert Korsnes
2001-09-04 11:39         ` John McCabe
2001-09-04 13:30         ` Marin David Condic
2001-09-04 14:07           ` Ted Dennison
2001-09-04 14:48             ` Marin David Condic
2001-09-04 18:35               ` Mark Biggar
2001-09-04 19:33                 ` Marin David Condic
2001-09-04 14:15         ` Ted Dennison
2001-09-05  9:14           ` John McCabe
2001-09-05 14:19             ` Ted Dennison
2001-09-05 16:24               ` John McCabe
2001-09-05 18:33               ` Ehud Lamm
2001-09-06  9:36           ` Reinert Korsnes [this message]
2001-09-06 17:10             ` (elementary question) Test on type ? Pragma inline(granularity)? Warren W. Gay VE3WWG
  -- strict thread matches above, loose matches on Subject: below --
2001-09-04 17:55 (elementary question) Test on type ? Beard, Frank
2001-09-05  9:16 ` John McCabe
replies disabled

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