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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd40601768eaf8fd X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Array of Variant Records Question... Date: 1999/09/09 Message-ID: <7r77i8$i08$1@nnrp1.deja.com>#1/1 X-Deja-AN: 522755648 References: <7r5vh3$imu1@svlss.lmms.lmco.com> <37d6a45c@news1.prserv.net> <37d6ccb6@news1.prserv.net> X-Http-Proxy: 1.0 x40.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Thu Sep 09 02:55:08 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-09-09T00:00:00+00:00 List-Id: In article <37d6ccb6@news1.prserv.net>, "Matthew Heaney" wrote: > To have array initialization a la Fortran, something like: > > type T (Id : Positive := 1) is record ... end record; > > type TA is array (Positive range <>) of T; > > function Init (I : Positive) return T; > > O : TA (1 .. 5) := (for I in O'Range => O (I) := Init (I)); > This syntax is off the top of my head; there are probably better ways to do > it, that would obviate the need for Init. > > The language maintainers also have to settle the issue of invoking > constructors for limited types during the declaration of the object. One > proposal is to allow constructors (functions returning T) to be called in > the declarative region. No need to invent syntax, this proposal was part of the language design at one point, but was removed as being an excessively complex feature for too little gain. There were even conditional expressions to use in this context. Matthew, as someone who is always feature hungry and always wants more complexity in the language, you should definitely read mapping document 2, you would probably like all kinds of bells and whistles you found there :-) Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.