comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: Type detection
Date: Sat, 01 May 2004 03:12:13 -0400
Date: 2004-05-01T03:12:13-04:00	[thread overview]
Message-ID: <fMSdnUY1f6pQ0A7d4p2dnA@comcast.com> (raw)
In-Reply-To: <Xns94DBE9DC62033jimmaureenrogers@204.127.36.1>

James Rogers wrote:

> The problem with all these tests is an assumption that there is one
> integer type. None of these tests can distinguish from various 
> integer types. They are only approximately good for determining 
> whether a type is an enumeration type or has a value within the
> range of Standard.Integer. In Ada this is not even close to type
> identification. This is merely distinguishing between enumeration
> and non-enumeration discrete types.

No, the tests are independent of the number of integer types, 'Pos 
returns a universal_integer value, so all the comparisons use that type. 
If somehow you had an enumeration type with more values than 
Standard.Integer'Last, the code would still work fine.

As to your other point, I thought that was the object, to determine 
which (sub)CLASS of types a generic formal belonged to, when the generic 
used (<>);

-- 

                                           Robert I. Eachus

"The terrorist enemy holds no territory, defends no population, is 
unconstrained by rules of warfare, and respects no law of morality. Such 
an enemy cannot be deterred, contained, appeased or negotiated with. It 
can only be destroyed--and that, ladies and gentlemen, is the business 
at hand."  -- Dick Cheney




  reply	other threads:[~2004-05-01  7:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-30 12:17 Newbie Ada Axel Druesnes
2004-04-30 12:22 ` Preben Randhol
2004-04-30 13:20 ` Hyman Rosen
2004-04-30 13:54 ` Type detection Björn Persson
2004-04-30 15:04   ` Marius Amado Alves
2004-05-01  0:28   ` Robert I. Eachus
2004-05-01  5:01     ` James Rogers
2004-05-01  7:12       ` Robert I. Eachus [this message]
2004-05-01 12:43       ` Björn Persson
2004-05-01 12:42     ` Björn Persson
2004-04-30 14:49 ` Newbie Ada Lutz Donnerhacke
2004-05-02 13:33 ` Stephen Leake
replies disabled

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