From: xavier grave <xavier.grave@ipno.in2p3.fr>
Subject: Re: Allocation questions
Date: Thu, 28 May 2009 13:55:07 +0200
Date: 2009-05-28T13:55:07+02:00 [thread overview]
Message-ID: <gvlu2r$ejr$1@ccpntc8.in2p3.fr> (raw)
In-Reply-To: <f7ca968f-93d1-4a64-988c-dfd4005c7e2a@s20g2000vbp.googlegroups.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> Or you could use a discriminant:
>
> type Samples (No_Of_Samples : Natural := 0) is
> record
> S : array (1 .. No_Of_Samples) of Sample;
> end record;
>
My two cents about variant discriminant : IMHO one should avoid to
declare No_Of_Samples as Natural and with a default value, because as
far as I remember some compilers will book for S (1 .. Natural'Last) of
Sample which can be a lot...
May be some compiler guru can confirm or infirm this ?
xavier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoee5sACgkQVIZi0A5BZF6aJQCeKvvUfImZxi0hBfrOevIJddTB
qJMAnRfDe03mMlNL/XHUayFVTHFdv9WV
=xdXN
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2009-05-28 11:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 9:46 Allocation questions Olivier Scalbert
2009-05-28 10:02 ` Martin
2009-05-28 11:55 ` xavier grave [this message]
2009-05-28 12:19 ` Ludovic Brenta
2009-05-28 13:00 ` Georg Bauhaus
2009-05-28 23:13 ` Robert A Duff
2009-05-28 10:05 ` Dmitry A. Kazakov
2009-05-28 10:40 ` Martin
2009-05-28 12:32 ` Olivier Scalbert
2009-05-28 13:39 ` Martin
2009-05-28 13:57 ` Olivier Scalbert
2009-05-28 14:51 ` Adam Beneschan
2009-05-28 17:58 ` Randy Brukardt
2009-05-28 14:04 ` Dmitry A. Kazakov
2009-05-28 16:59 ` Jeffrey R. Carter
2009-05-28 17:26 ` Olivier Scalbert
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox