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,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!not-for-mail From: zw@cs.man.ac.uk (zw) Newsgroups: comp.lang.ada Subject: Universal type in Ada Date: 15 Jun 2005 06:07:12 -0700 Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 130.88.192.82 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1118840833 15617 127.0.0.1 (15 Jun 2005 13:07:13 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 15 Jun 2005 13:07:13 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:11369 Date: 2005-06-15T06:07:12-07:00 List-Id: 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?