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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81bb2ce65a3240c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.223.40 with SMTP id qr8mr1912648pbc.0.1340972920101; Fri, 29 Jun 2012 05:28:40 -0700 (PDT) Path: l9ni33245pbj.0!nntp.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!news.mixmin.net!feeder.erje.net!news-1.dfn.de!news.dfn.de!news.uni-weimar.de!not-for-mail From: stefan-lucks@see-the.signature Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? Date: Fri, 29 Jun 2012 14:42:42 +0200 Organization: Bauhaus-Universitaet Weimar Message-ID: References: <3637793.35.1335340026327.JavaMail.geo-discussion-forums@ynfi5> <99d27165-f1da-4d0b-a121-fd8dbf637635@googlegroups.com> <8e48e4e4-14a0-4f6c-a133-2716f0506035@googlegroups.com> Reply-To: stefan-lucks@see-the.signature NNTP-Posting-Host: medsec1.medien.uni-weimar.de Mime-Version: 1.0 X-Trace: tigger.scc.uni-weimar.de 1340972920 5897 141.54.178.228 (29 Jun 2012 12:28:40 GMT) X-Complaints-To: news@tigger.scc.uni-weimar.de NNTP-Posting-Date: Fri, 29 Jun 2012 12:28:40 +0000 (UTC) X-X-Sender: lucks@medsec1.medien.uni-weimar.de In-Reply-To: <8e48e4e4-14a0-4f6c-a133-2716f0506035@googlegroups.com> Content-Type: TEXT/PLAIN; charset=US-ASCII Date: 2012-06-29T14:42:42+02:00 List-Id: On Fri, 29 Jun 2012, AdaMagica wrote: > > procedure Proc (An_In_Parameter : in Integer; > > An_Out_Parameter : out Integer; > > An_Inout_Parameter : in out Integer; > > An_Access_Parameter : access Integer); > > > > Proc (An_In_Parameter <= A, > > An_Out_Parameter => B, > > An_Inout_Parameter <=> C, > > An_Access_Parameter -> D'Access); > > > > A becomes An_In_Parameter, An_Out_Parameter becomes B, etc. > > I've often wished that be possible. However "<=" is already defined as a > relational operator "less or equal". so <== or something like that would > be needed. ("Greater or equal" is ">=", so there is no problem, but for > consistency ==> would then perhaps be better.) So what about the following? Proc (An_In_Parameter => in A, An_Out_Parameter => out B, An_Inout_Parameter => in out C, An_Access_Parameter => access D'Access); > > type Symmetric_Matrix (Dim : Natural) is record > > Values : Float_Array (1 .. Dim * (Dim + 1) / 2; > > end record; > > Also this would be nice. However then the upper bound would have to be > stored as a hidden record component as well, I guess, and this would > conflict with respresentation clauses (how to handle hidden components). It took me a moment to understand the issue, since the component Values has to store (or somehow "know") its own upper bound Values'Last, anyway. But then, the Symmetric Matrix would additionally have to store its own size somewhere, right? On the other hand, if there is a rep clause that the compiler cannot satisfy, than it can just reject the program. It would be better to prohibit rep clauses for that type, rather than prohibiting the type altogether. -- ---- Stefan.Lucks (at) uni-weimar.de, University of Weimar, Germany ---- ------ I love the taste of Cryptanalysis in the morning! ------