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,d7b303cc707b3cd4 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed01.chello.at!newsfeed02.chello.at!news.hispeed.ch.POSTED!not-for-mail Message-ID: <1610745.7KfYLUSmYx@linux1.krischik.com> From: Martin Krischik Subject: Re: Universal type Newsgroups: comp.lang.ada Date: Sun, 05 Aug 2007 15:46:51 +0200 References: <1186165731.373877.257550@i13g2000prf.googlegroups.com> User-Agent: KNode/0.10.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@hispeed.ch Organization: hispeed.ch NNTP-Posting-Host: 84.73.230.248 (84.73.230.248) NNTP-Posting-Date: Sun, 05 Aug 2007 16:45:06 +0200 X-Trace: bd90946b5e272f1ec435d31282 Xref: g2news2.google.com comp.lang.ada:1365 Date: 2007-08-05T15:46:51+02:00 List-Id: shaunpatterson@gmail.com wrote: > I'm looking to store different kinds of objects into a vector, queue, > etc > > In Java, everything is derived from Object. Is there something > similar > in Ada? Yes: System.Address. Ok, that's a joke - but with a true core: Java too does not store instances of Object - it too stores pointers of instances of Object. Ok, the pointers are hidden from sight - but so are the pointers used in Unlimited_Vector. And also, you can't store "int" in a a Java Vector - you can only store "Integer". And behind the scenes it is again a "pointer to Integer". Which is exactly what Unlimited_Vector does. So again Yes: If you are prepared to accept the same restrictions which are valid in Java. Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com