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,29c1212970bb6877 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!not-for-mail From: aschwarz@acm.org (skidmarks) Newsgroups: comp.lang.ada Subject: Re: String Pointer Bug Date: 9 Nov 2004 08:47:19 -0800 Organization: http://groups.google.com Message-ID: <35f054ea.0411090847.668b8d4e@posting.google.com> References: NNTP-Posting-Host: 199.46.200.230 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1100018840 27438 127.0.0.1 (9 Nov 2004 16:47:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 9 Nov 2004 16:47:20 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:6083 Date: 2004-11-09T08:47:19-08:00 List-Id: "Christoph Karl Walter Grein" wrote in message news:... > A long time ago, I made an exegesis of this problem. You may find it below > (sorry if the indentation should be lost, it's my mailer that swallows it, I do not know > to avoid this): Thank you. This is an excellent description. the only (fault) that I can see is that it requires a copy operation (Y: aliased D := X). I wonder, do you think that: Y: aliased D; for Y'Address use X'Address; is a viable alternative (please note, I did not say GOOD alternative). In this simple case, a copy serves no harm, other than some time. But if the data is large the cost will certainly grow, perhaps to being unacceptable. Another (but unattractive) alternative might be: type S1 is String(1..1); type S2 is String(1..2); ooo type Sn is String(1..n); type S_Ptr is access all String; type S1_Ptr is access all S1; ooo type Sn_Ptr is access all Sn; and so on. But how really ugly. thanks art