comp.lang.ada
 help / color / mirror / Atom feed
From: zw@cs.man.ac.uk
Subject: Re: Universal type in Ada
Date: 16 Jun 2005 06:23:51 -0700
Date: 2005-06-16T06:23:51-07:00	[thread overview]
Message-ID: <1118928231.090737.170070@g44g2000cwa.googlegroups.com> (raw)
In-Reply-To: <a3gytn0gjusp$.1kgj4kfixqylc.dlg@40tude.net>

Hi, thank you very much. This is a great idea to create pointers to an
Object. I also have the same idea, but my problem is a pointer must be
declared with a specific type such as a pointer to an Integer. However,
in Ada, when we declared Object as an abstract superclass, the existing
types like Integer, Float, String are not an Object, we could easily
define a superclass called "Object" and define all of our types
inherited from the "Object", this way we will get roughly same
functionalities like Object as the root type. However, there is no way
to cope with existing types like Integer. I would like to know that
whether this is possible to define a root type like "Object" in Java so
that whatever a "Method" is, it will always return an "Object"? because
all classes are inherited from "Object", so an Integer is an Object, a
Float is an Object, ...........




  reply	other threads:[~2005-06-16 13:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-15 13:07 Universal type in Ada zw
2005-06-15 13:32 ` Larry Kilgallen
2005-06-16 13:13   ` zw
2005-06-16 14:36     ` Preben Randhol
2005-06-17  2:54     ` Stephen Leake
2005-06-19 17:38     ` Martin Krischik
2005-06-15 13:55 ` Dmitry A. Kazakov
2005-06-15 14:37   ` Preben Randhol
2005-06-15 16:48     ` Dmitry A. Kazakov
2005-06-15 14:34 ` Preben Randhol
2005-06-16 13:10   ` zw
2005-06-15 16:31 ` Georg Bauhaus
2005-06-16  8:18 ` Ole-Hjalmar Kristensen
2005-06-16 11:59   ` Dmitry A. Kazakov
2005-06-16 13:23     ` zw [this message]
2005-06-16 14:19       ` jimmaureenrogers
2005-06-16 14:31       ` Dmitry A. Kazakov
2005-06-19 17:31       ` Martin Krischik
2005-06-19 17:26 ` Martin Krischik
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox