comp.lang.ada
 help / color / mirror / Atom feed
* (elementary question) Test on type ?
@ 2001-09-04  8:41 Reinert Korsnes
  2001-09-04  9:18 ` David C. Hoos, Sr.
  0 siblings, 1 reply; 18+ messages in thread
From: Reinert Korsnes @ 2001-09-04  8:41 UTC (permalink / raw)


Hi,
 
is it possible in Ada to test on type ? (did not manage to find out)
 
 
Assume:
 
 
-- specification :
generic
  type T is (<>);
function F(X : T) return Float;
 
--body :
 
function F(X : T) return Float is
begin
 
if Type(X) = Integer then  ??????
   something...
 
I := integer(X) ????
 
 
end;
 
--application prog:
 
function F1 is new F(T => Integer);


reinert

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



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2001-09-06 17:10 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2001-09-06 17:10             ` (elementary question) Test on type ? Pragma inline(granularity)? Warren W. Gay VE3WWG

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