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,32d9aa9d79729b31 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.238.65 with SMTP id vi1mr17012828pbc.7.1340723985161; Tue, 26 Jun 2012 08:19:45 -0700 (PDT) Path: l9ni22381pbj.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Any easy/build-in construct to extract submatrices from larger matrix? Date: Tue, 26 Jun 2012 08:19:44 -0700 (PDT) Organization: http://groups.google.com Message-ID: <5d23a78c-4bf2-4d07-8bca-8fac2064d5af@googlegroups.com> References: <788af57d-750d-418d-94bb-75c6557e36a9@g4g2000pbn.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1340723985 2344 127.0.0.1 (26 Jun 2012 15:19:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 26 Jun 2012 15:19:45 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-06-26T08:19:44-07:00 List-Id: On Tuesday, June 26, 2012 5:54:00 AM UTC-7, Robert A Duff wrote: >=20 > > http://archive.adaic.com/docs/reports/steelman/steelman.htm#2 > > > > "Every source program shall also have a representation that > > uses only the following 55 character subset of the ASCII graphics: > > > > %&'()*+,-./:;<=3D>? > > 0123456789 > > ABCDEFGHIJKLMNOPQRSTUVWXYZ_ > > > > " > > > > You see that [] were not even in the allowed character set. >=20 > And yet string literals used double quotes, aggregates use > vertical bar, and based literals use sharp sign, even > though I don't see any of: >=20 > " | # >=20 > listed above. [] were not outlawed by the above requirement, > either. In Ada 83, those three characters could be replaced by %, !, : respectively= . (It's still in the language as a deprecated feature; see J.2.) I don't think it would have worked to say that [] is used for array indexin= g, but that they could be replaced by () if the symbols [] weren't availabl= e. The reason was is that changing [] to () would introduce some ambiguiti= es where none existed before, which I think would really screw up the overl= oad resolution rules. (Suppose you have two functions F, one that takes an= integer parameter and returns an integer, and one that takes no parameters= and returns a array of integer or an access to an array of integer. Now, = if [] were used as the array index, with no replacement allowed? F(3) woul= d unambiguously call the F that takes a parameter and F[3] would unambiguou= sly call the parameterless F that returns an array or access-array. But wh= at if the rules said that [ and ] could be relaced by ( and )? What would = the rules say about F(3) now? I think this would be too confusing.) Anoth= er possibility would be to say that [ and ] could be replaced by two-charac= ter sequences such as, for instance, (: and :) This would be unambiguous = because smileys hadn't yet been invented. I think that would have worked b= ut I guess nobody thought of that. -- Adam =20