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,ffc9e2fe760c58fd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Records that could be arrays Date: Thu, 23 Feb 2006 10:22:53 +0100 Organization: Adalog Message-ID: References: NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1140688866 16523 195.25.228.57 (23 Feb 2006 10:01:06 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 23 Feb 2006 10:01:06 +0000 (UTC) User-Agent: Thunderbird 1.5 (Windows/20051201) In-Reply-To: Xref: g2news1.google.com comp.lang.ada:3095 Date: 2006-02-23T10:22:53+01:00 List-Id: Justin Gombos a �crit : > I have set a rule for myself: Composite types composed solely of one > type of element should be declared as arrays rather than records. > I've never seen this rule in a coding standard. The idea is that you > can be more expressive with an array. Example- there are more options > when it comes to an arrays role in control structures. Plus the > "others =>" notation is available. Thoughts? > I beg to disagree here. Arrays are for *iterative* structures, if you don't have a for loop over an array, it should be a record. The fact that all components are of the same type may be an accident that changes during program evolution. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr