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!news1.google.com!news2.google.com!news.glorb.com!newsfeed2.telusplanet.net!newsfeed.telus.net!edtnps89.POSTED!023a3d7c!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: Wed, 06 Jun 2007 22:52:31 GMT NNTP-Posting-Host: 208.66.252.228 X-Trace: edtnps89 1181170351 208.66.252.228 (Wed, 06 Jun 2007 16:52:31 MDT) NNTP-Posting-Date: Wed, 06 Jun 2007 16:52:31 MDT Xref: g2news1.google.com comp.lang.ada:16082 Date: 2007-06-06T22:52:31+00:00 List-Id: Maciej Sobczak writes: > procedure To_Upper(S : in out String); > > Such a procedure is perfectly reasonable. > What is not reasonable is this: > > procedure Swap(X, Y : in out String); I don't see the difference. Consider: declare s : String := "123"; begin To_Upper(s); end; procedure To_Upper(S : in out String) begin s := "12345678"; end; > procedure Safe_Swap(X, Y : in out String) with X'Length = Y'Length; Ugh. This is tedious. Seems easier to me to just let the contraint error happen. If you really need this, also have a way to just say "with matching constraints" directly, e.g. with X'Subtype = Y'Subtype That way one does not have to get all explicit for other types that have many explicit constraints. -- 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.