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.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,dda6cdc6d53fb10d X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!wn11feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Type detection From: James Rogers References: <409243DA.2000906@noos.fr> Message-ID: User-Agent: Xnews/5.04.25 Date: Sat, 01 May 2004 05:01:32 GMT NNTP-Posting-Host: 12.73.182.120 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1083387692 12.73.182.120 (Sat, 01 May 2004 05:01:32 GMT) NNTP-Posting-Date: Sat, 01 May 2004 05:01:32 GMT Organization: AT&T Worldnet Xref: controlnews3.google.com comp.lang.ada:157 Date: 2004-05-01T05:01:32+00:00 List-Id: "Robert I. Eachus" wrote in news:QoydncxqQenacg_d4p2dnA@comcast.com: > Bj�rn Persson wrote: > >> For the special case of distinguishing integer types from enumeration >> types, I've been thinking of using something like this... > > I extended the idea a little further, but there is still some work to > do. A character type is an enumeration type where at least one of the > enumeration values is a character literal. So the test for > enumeration types could be extended with a loop. 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. Jim Rogers