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=0.6 required=5.0 tests=BAYES_40,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aa30581d45d72920 X-Google-Attributes: gid103376,public From: "Matthew Heaney" Subject: Re: Dynamic memory allocation with Ada83 Date: 2000/01/24 Message-ID: #1/1 X-Deja-AN: 577111809 Content-transfer-encoding: 7bit References: <86hpt2$gjj$1@nnrp1.deja.com> Content-Type: text/plain; charset="US-ASCII" X-ELN-Date: Mon Jan 24 14:15:41 2000 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 948752141 38.26.192.132 (Mon, 24 Jan 2000 14:15:41 PST) Organization: EarthLink Network, Inc. Mime-version: 1.0 NNTP-Posting-Date: Mon, 24 Jan 2000 14:15:41 PST Newsgroups: comp.lang.ada Date: 2000-01-24T00:00:00+00:00 List-Id: In article <86hpt2$gjj$1@nnrp1.deja.com> , vxo25@my-deja.com wrote: > Hello, > > I want to implement dynamic memory allocation with Ada83. > Could anyone help me ? What exactly do you mean by "I want to implement dynamic memory allocation"? Do you mean that you want to allocate an object on the heap? If so, then do this: type TA is access Constrained_Type; O : TA := new Constrained_Type; If you want to allocate an object on the heap whose type is unconstrained, then you have to supply a constraint: type String_Access is access String; S : SA := new String'("this is a string on the heap"); or S : SA := new String (1 .. 10); If you don't mean "allocate an object on the heap," then you have to say what it is you're trying to do. -- The new standards [for science curricula in Kansas] do not forbid the teaching of evolution, but the subject will no longer be included in statewide tests for evaluating students--a virtual guarantee, given the realities of education, that this central concept of biology will be diluted or eliminated, thus reducing courses to something like chemistry without the periodic table, or American history without Lincoln. Stephen Jay Gould, Time, 23 Aug 1999