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!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news.illinois.net!attcg1!ip.att.net!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Universal type in Ada Date: 15 Jun 2005 08:32:04 -0500 Organization: LJK Software Message-ID: <6x57sZABaxNz@eisner.encompasserve.org> References: NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1118842275 23517 192.135.80.34 (15 Jun 2005 13:31:15 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Wed, 15 Jun 2005 13:31:15 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:11371 Date: 2005-06-15T08:32:04-05:00 List-Id: In article , zw@cs.man.ac.uk (zw) writes: > Hi, I am trying to create a Universal type in Ada such as "Object" in > Java so that I could define a function that returns a value in this > Universal type, then I could lower-cast value in this type to its > specific type such as String, Float or any user-defined types. Because > in Java if a method returns an Object, it could be casted to any other > types that are subtypes of Object. Is there a Universal type in Ada? > Could anyone tell me how to create such types in Ada, please? That is not a very Ada-like way to program. Are absolutely certain you are not trying to transfer programming habits from other languages over to Ada ?