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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f7f7e25c656d4fca X-Google-Attributes: gid103376,public From: Samuel Tardieu Subject: Re: Discrimant Record Types and GNAT Date: 1999/01/12 Message-ID: <87ogo490cf.fsf@zaphod.enst.fr>#1/1 X-Deja-AN: 431626456 References: <369A84AB.CD5B5A4D@nordnet.fr> Mail-Copies-To: sam@ada.eu.org X-Complaints-To: usenet@enst.enst.fr X-Trace: enst.enst.fr 916141822 12226 137.194.160.95 (12 Jan 1999 11:50:22 GMT) Organization: TELECOM Paris Mime-Version: 1.0 User-Agent: Gnus/5.070066 (Pterodactyl Gnus v0.66) XEmacs/21.2(beta3) (Aglaia) NNTP-Posting-Date: 12 Jan 1999 11:50:22 GMT Newsgroups: comp.lang.ada Date: 1999-01-12T11:50:22+00:00 List-Id: >>>>> "Arnaud" == abailly writes: Arnaud> I've been taught by my Ada teacher that this kind of object Arnaud> could be declared as tab1 : Rec; and then used with tab1 := Arnaud> effectively creating an unconstrained array. Sure, the maximum size will be reserved, that's why you will be able to store any record in it. However, here the maximum size is the one of an array with up to Positive'Last components. Arnaud> Anyone got an answer to this problem ? There are several solutions of course, two of them being straightforward: - don't set a default value and use pointers - use a smaller subtype than positive Sam -- Samuel Tardieu -- sam@ada.eu.org