From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dda6cdc6d53fb10d X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!nntp-server.pubsub.com!border1.nntp.ash.giganews.com!nntp.giganews.com!local1.nntp.ash.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 01 May 2004 02:12:13 -0500 Date: Sat, 01 May 2004 03:12:13 -0400 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Type detection References: <409243DA.2000906@noos.fr> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.147.90.114 X-Trace: sv3-aLU+Mioorp+n7URFUcINgWBZWiLw9+SPgv6B2oAONdWFy6cyimZGoFgWAmPSasEUWYLPcU8Q122Awrx!+lLD3IajvDEFI0UdsSISHcwlT90SbEIHO/ac9FNN60DSi7neFRChEBItTA57QA== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: controlnews3.google.com comp.lang.ada:159 Date: 2004-05-01T03:12:13-04:00 List-Id: 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