From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Ada generics and private type operations
Date: Sat, 14 Oct 2006 03:46:30 -0400
Date: 2006-10-14T03:46:30-04:00 [thread overview]
Message-ID: <u3b9r8hm1.fsf@stephe-leake.org> (raw)
In-Reply-To: mailman.0.1160709703.4389.comp.lang.ada@ada-france.org
Robert Sinclair <bob1sinclair@yahoo.com> writes:
> I've written a generic using Ada 95. The generic has 5 private
> types. I'm trying to perform ">=" and "<=" operations on the private
> types to no avail. I'm using 'With Function ">=" (l, r :
> private_type) return boolean' in the declaration of the generic. I
> can't seem to figure out how to code the instantiating program to
> actually perform the operation. Can someone please provide a simple
> code example?
We need to see your code first.
One general rule I follow is to use names rather than operator symbols
for generic parameters;
generic
with function Greater_Equal ...;
...
That makes it clearer what is going on. The overloading/inheritance
rules for operator symbols can be hard to understand.
After you get things working this way, you can try replacing
Greater_Equal with ">=", and see if it breaks.
--
-- Stephe
prev parent reply other threads:[~2006-10-14 7:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.0.1160709703.4389.comp.lang.ada@ada-france.org>
2006-10-13 4:34 ` Ada generics and private type operations Jeffrey R. Carter
[not found] ` <mailman.1.1160744826.4389.comp.lang.ada@ada-france.org>
2006-10-13 20:39 ` Adam Beneschan
2006-10-13 21:04 ` Adam Beneschan
2006-10-14 9:48 ` Simon Wright
2006-10-13 21:08 ` Jeffrey R. Carter
2006-10-14 7:46 ` Stephen Leake [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox