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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6cbbf1799c1dc6da X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!news.wiretrip.org!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!zen.net.uk!dedekind.zen.co.uk!news-peer-lilac.gradwell.net!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada References: <43CCAB76.6050907@mailinator.com> Subject: Re: Ada 2005 box (<>) rules in default values Date: Tue, 17 Jan 2006 09:35:01 -0000 Organization: BAE SYSTEMS X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Message-ID: <43ccb83c$1_1@glkas0286.greenlnk.net> X-Original-NNTP-Posting-Host: glkas0286.greenlnk.net NNTP-Posting-Host: 20.133.0.1 X-Trace: 1137490591 news.gradwell.net 87290 dnews/20.133.0.1:24234 X-Complaints-To: news-abuse@gradwell.net Xref: g2news1.google.com comp.lang.ada:2509 Date: 2006-01-17T09:35:01+00:00 List-Id: Alex R. Mosteo wrote: > Hi all, [snip] > with this will also be welcome). Your understanding seems to be what John Barnes describes in his paper at "http://www.gnat.com/ada_2005.php#": "The main change is that the box notation <> is now permitted as the value in a named aggregate. The meaning is that the component of the aggregate takes the default value if there is one. So if we have a record type such as type RT is record A: Integer := 7; B: access Integer; C: Float; end record; then if we write X: RT := (A => <>, B => <>, C => <>); then X.A has the value 7, X.B has the value null and X.C is undefined. So the default value is that given in the record type declaration or, in the absence of such an explicit default value, it is the default value for the type. If there is no explicit default value and the type does not have one either then the value is simply undefined as usual. The above example could be abbreviated to X: RT := (others => <>); "