comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm-host.bauhaus@maps.futureapps.de>
Subject: Re: Function definitions - with clarification
Date: Sun, 22 Jun 2014 17:30:36 +0200
Date: 2014-06-22T17:30:36+02:00	[thread overview]
Message-ID: <53a6f69c$0$6619$9b4e6d93@newsspool4.arcor-online.net> (raw)
In-Reply-To: <f12eba4c-2757-4496-861b-101cb7e355d6@googlegroups.com>

On 22/06/14 13:34, montgrimpulo wrote:
> -- type population is array (1 .. Popsize) of Individual;
> -- gives: unconstrained element in array declaration

This means that type Individual is a record type that has
discriminants without default values for the discriminants.

The compiler has no way of knowing in advance the size of record
objects, since the size may differ per object. (Given that the record
definition can have variant parts whose structure and size will
depend on the discriminants, the absence of default values leaves
this open until actual objects are declared, making the objects'
size and structure unknown at the point of the array declaration.)

Therefore, an array of objects of type Individual would have
unconstrained elements (of type Individual, of unknown size
and structure, possibly varying), which arrays may not have.




  parent reply	other threads:[~2014-06-22 15:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-22 11:34 Function definitions - with clarification montgrimpulo
2014-06-22 12:04 ` Simon Clubley
2014-06-22 14:25 ` montgrimpulo
2014-06-22 15:30 ` Georg Bauhaus [this message]
2014-06-22 17:29 ` montgrimpulo
2014-06-22 17:45 ` Shark8
2014-06-22 18:03   ` montgrimpulo
2014-06-22 18:45     ` Simon Clubley
2014-06-22 19:28       ` montgrimpulo
2014-06-22 21:04         ` Simon Wright
2014-06-22 21:17       ` Jeffrey Carter
2014-06-22 19:55     ` Shark8
2014-06-23 16:26 ` Adam Beneschan
2014-06-29 15:31 ` cotswold
2014-06-29 19:20 ` montgrimpulo
2014-06-30  9:29   ` G.B.
2014-06-30 17:55     ` Shark8
2014-07-01  8:58       ` Georg Bauhaus
2014-07-04  6:45         ` J-P. Rosen
2014-06-30 13:23 ` montgrimpulo
replies disabled

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