comp.lang.ada
 help / color / mirror / Atom feed
From: sbelmont700@gmail.com
Subject: Passing indefinite types
Date: Sat, 2 Feb 2013 13:07:39 -0800 (PST)
Date: 2013-02-02T13:07:39-08:00	[thread overview]
Message-ID: <5262a822-409a-4c79-a842-0e716527cb70@googlegroups.com> (raw)

Hi,

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.

Thank you.

-sb




             reply	other threads:[~2013-02-02 21:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-02 21:07 sbelmont700 [this message]
2013-02-02 21:31 ` Passing indefinite types Jeffrey Carter
2013-02-03  0:27   ` sbelmont700
2013-02-03  8:07     ` Dmitry A. Kazakov
2013-02-03 10:22 ` gautier_niouzes
2013-02-03 22:26 ` Stephen Leake
2013-02-04  1:25   ` sbelmont700
2013-02-04  3:46     ` Shark8
2013-02-05  2:40     ` Randy Brukardt
2013-02-05 13:01     ` Stephen Leake
2013-02-05 20:56       ` Randy Brukardt
2013-02-05 21:16 ` sbelmont700
replies disabled

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