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=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f7f7e25c656d4fca,start X-Google-Attributes: gid103376,public From: abailly Subject: Discrimant Record Types and GNAT Date: 1999/01/11 Message-ID: <369A84AB.CD5B5A4D@nordnet.fr>#1/1 X-Deja-AN: 431406865 Content-Transfer-Encoding: 7bit Organization: NordNet, l'Internet des gens du Nord Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-01-11T00:00:00+00:00 List-Id: I've got problems with using discrimant record types with defaults values For example : type Tab is array(POSITIVE range <>) of TOTO; type REc (taille : NATURAL := 0) is record t : tab(1..taille); end record; I've been taught by my Ada teacher that this kind of object could be declared as tab1 : Rec; and then used with tab1 := effectively creating an unconstrained array. However, when I compile something like that with GNAT (3.10p on a Linux-i586 box) I get warnings at compile time and STORAGE_ERROR at runtime, which is not the case with another compiler we are using for lessons. Anyone got an answer to this problem ? Thank you in advance Arnaud BAILLY