comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: generic binary tree in ada 83
Date: 1998/04/28
Date: 1998-04-28T00:00:00+00:00	[thread overview]
Message-ID: <dewar.893821882@merv> (raw)
In-Reply-To: 6i55q1$nfe@top.mitre.org


Michael said

<<Just add the following lines on top of your package that implements
the Tree data structure on type character:

    generic
        type character is private;

and it will work on generic data. To instantiate it, use the following
code:
      package tree_of_limbs is new character_tree (character => limbs);

Then it will work on TYPE LIMBS exactly as it worked on type character.
>>


This is almost certainly incorrect advice. It is perhaps deliberately
wrong (people often give answers that are deliberately incomplete when
it sounds likely that the question is of the kind "please help me with
my assignment, I don't feel like doing it myself" (be warned!)

But almost certainly the binary tree implementation will require a
total ordering, which of course the above generic formal does not provide.





  reply	other threads:[~1998-04-28  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-28  0:00 generic binary tree in ada 83 karen westcott
1998-04-28  0:00 ` Matthew Heaney
1998-04-28  0:00 ` Michael F Brenner
1998-04-28  0:00   ` Robert Dewar [this message]
1998-04-29  0:00   ` Pascal Obry
replies disabled

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