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: a07f3367d7,3ebfb7ec7bfb06fa X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.98.103 with SMTP id eh7mr1829899wib.3.1360478175181; Sat, 09 Feb 2013 22:36:15 -0800 (PST) Path: bp2ni28158wib.1!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!216.40.29.245.MISMATCH!novia!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Passing indefinite types Date: Sat, 02 Feb 2013 14:31:06 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <5262a822-409a-4c79-a842-0e716527cb70@googlegroups.com> Mime-Version: 1.0 Injection-Date: Sat, 2 Feb 2013 21:30:48 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="656ea2f23126f57fb36504d2d15a002c"; logging-data="30675"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IHImEXnTzn4e3kFgkvSCQZfJBg3t9zS8=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <5262a822-409a-4c79-a842-0e716527cb70@googlegroups.com> Cancel-Lock: sha1:grYsIM/VpMP4eqnn8HYzNS/V1C8= Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2013-02-02T14:31:06-07:00 List-Id: On 02/02/2013 02:07 PM, sbelmont700@gmail.com wrote: > > Does anyone know of a slick way to pass several locally declared, indefinite > types to a subprogram without resorting to the heap or Unchecked_Access? An > array of indefinite types is obviously not possible, an array of named access > types is subject to accessibility problems, and wrapping the object in an > 'accessor' (i.e. a null record with an access discriminant) turns right back > into a problem of an array of indefinite types. I can always declare a > procedure that takes a bunch of individual parameters, but this seems like a > kludge, and doesn't solve the problem if the number of items might vary. It > would be nice if there was some way to establish that a discriminated record > is in fact a fixed size, or perhaps if an array of anonymous access types had > the same accessibility as access discriminants. But if anyone knows of a > workaround, I would be interested in how it was done. How about an indefinite container? -- Jeff Carter "I feel as though somebody stepped on my tongue with muddy feet." Never Give a Sucker an Even Break 112