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,db88d0444fafe8eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!newscon02.news.prodigy.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Surprise in array concatenation Date: 05 Sep 2005 17:54:49 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1125610942.747981.280770@f14g2000cwb.googlegroups.com> <1125935610.797293.40550@g43g2000cwa.googlegroups.com> <6W0Te.5718$4P5.4916@newsread2.news.pas.earthlink.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1125957289 13893 192.74.137.71 (5 Sep 2005 21:54:49 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 5 Sep 2005 21:54:49 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:4454 Date: 2005-09-05T17:54:49-04:00 List-Id: "Jeffrey R. Carter" writes: > Gene wrote: > > > -- 'First is not always 1. How marginally > > Ada! > > 'First is not always 1 (or 0, or X) is a basic concept in Ada. It's only > if you don't know, or forget, this, and assume the behavior you learned > in lesser languages, that you have problems. > > I came to Ada from Pascal, so I was used to the lower bound not being > fixed, Heh? The lower (and upper!) bound of all array types in Pascal is fixed. And it has to be fixed at a static value. Every array object of a given type has the same fixed bounds. (Well, some version of Pascal added conformant arrays, which relaxed this requirement for formal parameters.) It's true that the lower bound doesn't have to be 1, or any other particular value, but it has to be static, and it is fixed for that array type. I don't think anybody would suggest that _all_ arrays in Ada must start at 1. That would preclude arrays indexed by enumeration types, which don't have a concept of 1. >... and the discovery of attributes simply made life easier. Had I > come directly from FORTRAN, for example, I might have had more > difficulty, because it would have involved grasping both the idea of > user-defined lower bounds and the idea of attributes. - Bob