From: ametayer98@hotmail.com (annabelle)
Subject: beginner ada generic fonction
Date: 22 Mar 2002 17:37:17 -0800
Date: 2002-03-23T01:37:17+00:00 [thread overview]
Message-ID: <8235efb6.0203221737.44abefff@posting.google.com> (raw)
Hello,
I was given a spec(ADS)using genericity. I have to use the function
"TheKey" (see below)
______________________________________________________________________
GENERIC
TYPE Element_type IS Private
Key_type IS Private;
WITH Function TheKey (my_item : Element_type) Return Key_type;
WITH Function "<" (Left,Right: Key_type) Return Boolean;
______________________________________________________________________
I am trying to use the function "TheKey" in my ADA program but I need
to use the function for TWO different type of elements !!!
______________________________________________________________________
function TheKey(My_item: a_course) return Course_key_type is
begin
Return My_item.course_key;
end lacle;
______________________________________________________________________
How can I use the same function for another type (a_student)??
Please HELP !!!
next reply other threads:[~2002-03-23 1:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-23 1:37 annabelle [this message]
2002-03-23 3:29 ` beginner ada generic fonction Steve Doiel
2002-03-24 2:55 ` annabelle
2002-03-24 3:10 ` annabelle
2002-03-24 3:51 ` Steve Doiel
2002-03-24 17:31 ` annabelle
2002-03-25 6:05 ` Simon Wright
2002-03-24 20:37 ` annabelle
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox