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,61e9062c1f23b9d5 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!newsfeed2.telusplanet.net!newsfeed.telus.net!edtnps90.POSTED!53ab2750!not-for-mail Sender: blaak@METROID Newsgroups: comp.lang.ada Subject: Re: Reconsidering assignment References: <1181165630.012508.55290@i38g2000prf.googlegroups.com> From: Ray Blaak Message-ID: Organization: The Transcend User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 07 Jun 2007 16:28:05 GMT NNTP-Posting-Host: 154.20.94.243 X-Trace: edtnps90 1181233685 154.20.94.243 (Thu, 07 Jun 2007 10:28:05 MDT) NNTP-Posting-Date: Thu, 07 Jun 2007 10:28:05 MDT Xref: g2news1.google.com comp.lang.ada:16090 Date: 2007-06-07T16:28:05+00:00 List-Id: Stefan Lucks writes: > I like your suggestion, but i would prefer a simpler syntax. Use some > attribute Type in this case. Thus, I would prefer > > procedure Swap (X: in out String; Y: in out X'Type); > > over > > > procedure Safe_Swap(X, Y : in out String) with X'Length = Y'Length; A much better idea, and it allows an easier way to contrain different arguments, e.g. procedure Doit(X: in out Foo; Y : in out X'Type; A : Bar; B : A'Type); -- Cheers, The Rhythm is around me, The Rhythm has control. Ray Blaak The Rhythm is inside me, rAYblaaK@STRIPCAPStelus.net The Rhythm has my soul.