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,acc23819b8999ef9 X-Google-Attributes: gid103376,public From: matthew_heaney@acm.org (Matthew Heaney) Subject: Re: an array of records within an array of records Date: 1998/04/15 Message-ID: #1/1 X-Deja-AN: 344483959 Content-Transfer-Encoding: 8bit References: <3533A214.D5F94451@mcmail.com> <6h307q$5qj@top.mitre.org> Content-Type: text/plain; charset=ISO-8859-1 Organization: Network Intensive Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-04-15T00:00:00+00:00 List-Id: In article <6h307q$5qj@top.mitre.org>, mfb@mbunix.mitre.org (Michael F Brenner) wrote: >Yes, record initialization is a little long-winded, and is even >more so when you make it more readable by adding in the field names: > > x := (CD=> 190, title => to_20 ("White Album"), author => to_20("Beatles")); > >Although it is long-winded, giving the field names can be very helpful >if you come back to the data years later and wonder what is being >filled in. Here's a case where using the identity operator as a constructor can improve things: x := (CD => 190, title => +"White Album", author => +"Beatles"); In general, when you have a subprogram (or record type) that has parameters (components) of the same type (as you do here, with type String), then it's safer to use named notation, so you don't accidently assign the wrong value.