* Generic type in package
@ 2005-01-21 18:07 Stefan Merwitz
2005-01-21 18:22 ` Ludovic Brenta
2005-01-22 8:32 ` Martin Krischik
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Merwitz @ 2005-01-21 18:07 UTC (permalink / raw)
Hello,
I've seen the following type definition in a package-file (ads):
generic
type T is (<>);
this seems to allow comparing (smaller, greater or equal) of the type T.
But I did not find this type definition ("(<>") in the Ada
documentation. What are the differences to limited private and does this
constrict the usable data types for T?
Thanks in advance,
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Generic type in package
2005-01-21 18:07 Generic type in package Stefan Merwitz
@ 2005-01-21 18:22 ` Ludovic Brenta
2005-01-22 8:32 ` Martin Krischik
1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Brenta @ 2005-01-21 18:22 UTC (permalink / raw)
Stefan Merwitz writes:
> Hello,
>
> I've seen the following type definition in a package-file (ads):
>
> generic
> type T is (<>);
>
> this seems to allow comparing (smaller, greater or equal) of the type
> T. But I did not find this type definition ("(<>") in the Ada
> documentation. What are the differences to limited private and does
> this constrict the usable data types for T?
>
>
> Thanks in advance,
>
> Stefan
It means that T must be a discrete type: either an enumeration, a
range, or a modular type. See ARM 12.5.2 and 3.2(12).
HTH
--
Ludovic Brenta.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Generic type in package
2005-01-21 18:07 Generic type in package Stefan Merwitz
2005-01-21 18:22 ` Ludovic Brenta
@ 2005-01-22 8:32 ` Martin Krischik
1 sibling, 0 replies; 3+ messages in thread
From: Martin Krischik @ 2005-01-22 8:32 UTC (permalink / raw)
Stefan Merwitz wrote:
> Hello,
>
> I've seen the following type definition in a package-file (ads):
>
> generic
> type T is (<>);
>
> this seems to allow comparing (smaller, greater or equal) of the type T.
> But I did not find this type definition ("(<>") in the Ada
> documentation. What are the differences to limited private and does this
> constrict the usable data types for T?
No - its the "box" Read:
http://en.wikibooks.org/wiki/Programming:Ada:Special:box
Martin
--
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-01-22 8:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-21 18:07 Generic type in package Stefan Merwitz
2005-01-21 18:22 ` Ludovic Brenta
2005-01-22 8:32 ` Martin Krischik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox