comp.lang.ada
 help / color / mirror / Atom feed
From: bdbryant@mail.utexas.edu (Bobby D. Bryant)
Subject: Re: Dynamic array allocation and STL equivalents?
Date: Fri, 11 Feb 2005 17:24:00 +0000 (UTC)
Date: 2005-02-11T17:24:00+00:00	[thread overview]
Message-ID: <cuipnf$aau$1@geraldo.cc.utexas.edu> (raw)
In-Reply-To: 1108127216.221977.60830@o13g2000cwo.googlegroups.com

On Fri, 11 Feb 2005, brian.b.mcguinness@lmco.com wrote:

> Back in the mid 1980s, out of curiosity I bought books about a number
> of programming languages, including LISP and Forth.  One of these books
> was a turquoise and white paperback about Ada by J.G.P. Barnes.  During
> a summer vacation trip, I read the Barnes book while riding for hours
> down highways in the car.  I was impressed with features such as being
> able to overload operators for newly defined types, the exception
> handling facilities, and the ability to write constants in a wide
> variety of bases.  My impression was that this was Pascal done right.

Pascal pretty much _was_ "done right", given its pedagogical purpose.


> But at the time I didn't have access to an Ada compiler, so I couldn't
> play with the language.
> 
> Recently, while looking through a list of GNU software, I was reminded
> that there is a Gnu Ada compiler, so I installed it on a computer at
> home, along with its library.  So far I have not found an rpm package
> of GtkAda for Fedora Core 3, but I am still looking.

Google for 'gnat "fedora core 3"' and you'll get some hits which may
have what you want.  (Use your own judgement as to how safe a given
download site is.)


> I would like to write a few Ada programs and play around with the
> language a bit.  From the mid 1980s through the early 1990s I wrote
> programs in Borland Turbo Pascal 3 through 6, which I was quite fond
> of, so I shouldn't have much trouble picking up Ada, which has a
> similar syntax.  But there are a few things I don't know how to do.
> For one thing, I have looked through the Barnes book, the pages of
> which have turned tan with age, and online, but can't find any
> information on how to allocate arrays dynamically; there seems to be no
> equivalent to the C malloc() function or the C++ dimensioned new.  If
> someone would tell me how to do this, I would appreciate it.

Others have already answered this, but I'd like to add that your book
is apparently pre- Ada95, so you may want to get a newer book, or at
least consult some on-line sources to see what has changed.

Here's the Ada95 reference manual:
http://www.adahome.com/rm95/rm9x-toc.html, though it is probably easier
to learn from a book.

Here's a page about Ada83 vs. Ada95:
http://www.adaic.org/learn/tech/8395comp.html

-- 
Bobby Bryant
Austin, Texas



  parent reply	other threads:[~2005-02-11 17:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-11 13:06 Dynamic array allocation and STL equivalents? brian.b.mcguinness
2005-02-11 13:43 ` Jeff C
2005-02-14 15:23   ` Marc A. Criley
2005-02-11 14:41 ` Dmitry A. Kazakov
2005-02-11 15:50   ` Adrien Plisson
2005-02-11 17:47   ` REH
2005-02-12  9:28     ` Dmitry A. Kazakov
2005-02-12 18:52       ` Robert A Duff
2005-02-11 17:24 ` Bobby D. Bryant [this message]
2005-02-12  0:06   ` Robert A Duff
2005-02-12  3:45     ` Bobby D. Bryant
2005-02-11 18:07 ` Matthew Heaney
2005-02-11 18:36   ` Martin Krischik
2005-02-11 19:35 ` brian.b.mcguinness
2005-02-12  1:04 ` Jeffrey Carter
2005-02-12  6:19 ` Bobby D. Bryant
replies disabled

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