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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,63fa88e2f1a3ebea X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!blackbush.cw.net!cw.net!feed.news.tiscali.de!news.belwue.de!irazu.switch.ch!ezmp2.switch.ch!news-zh.switch.ch!switch.ch!news.hispeed.ch!linux2.krischik.com!news From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Universal type in Ada Date: Sun, 19 Jun 2005 19:38:41 +0200 Organization: Cablecom Newsserver Message-ID: <1975302.ffmyICCkXN@linux1.krischik.com> References: <6x57sZABaxNz@eisner.encompasserve.org> <1118927593.623683.105940@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: 84-73-3-177.dclient.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.hispeed.ch 1119253539 2098 84.73.3.177 (20 Jun 2005 07:45:39 GMT) X-Complaints-To: news@hispeed.ch NNTP-Posting-Date: Mon, 20 Jun 2005 07:45:39 +0000 (UTC) User-Agent: KNode/0.9.0 Xref: g2news1.google.com comp.lang.ada:11494 Date: 2005-06-19T19:38:41+02:00 List-Id: zw@cs.man.ac.uk wrote: > Yes, I am trying to transfer a program in Java to Ada. Because as far > as I know there is no reflection mechanisms in Ada, so what I do is to > try to create a new API for reflection in Ada that would do someting > similar to java.lang.reflect Not quite true. Ada does have some form of reflection via the tag. You could use the external tag or the expanded name to determine the type of an object. http://www.adaic.com/standards/rm-amend/html/RM-3-9.html Also the operator "in" can be helpfull. And just like Java Ada will issue an exception when you convert objects which should not be converted. Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com