comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: Dynamically allocated array?
Date: 1999/02/08
Date: 1999-02-08T00:00:00+00:00	[thread overview]
Message-ID: <m3k8xtilop.fsf@mheaney.ni.net> (raw)
In-Reply-To: 01be5305$731ee8e0$2604fbd1@longslide

"Craig Garrett" <cgarrett@siscom.net> writes:

> How does one dynamically allocate an array in Ada without using the
> "declare" statement?

procedure Op is

   O : String_Access := new String'("allocated");

begin

   O := new String'("another allocation");

end;


But what's wrong with a declare block?

  declare
    Name : constant String := Get_Name (File);
  begin


No heap is required...





           reply	other threads:[~1999-02-08  0:00 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <01be5305$731ee8e0$2604fbd1@longslide>]
replies disabled

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