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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable 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!news2.google.com!proxad.net!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "Christoph Karl Walter Grein" Newsgroups: comp.lang.ada Subject: Re: String Pointer Bug Date: Mon, 08 Nov 2004 14:34:10 +0100 Organization: http://freemail.web.de/ Message-ID: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1099920903 20813 212.85.156.195 (8 Nov 2004 13:35:03 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Mon, 8 Nov 2004 13:35:03 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: Precedence: fm-user X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.5 List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:6048 Date: 2004-11-08T14:34:10+01:00 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): procedure Try is type D is array (Integer range <>) of Boolean; type A is access all D; X: aliased D (1..3); AX: A := X'Access; -- not OK BX: A (X'Range) := X'Access; -- not OK Y: aliased D := X; AY: A := Y'Access; -- OK BY: A (Y'Range) := Y'Access; -- OK begin null; end Try; ---------------------------------------------------- -- My exegesis: -- -- RM 3.3.1(8,9) -- -- Nominal Actual -- subtype -- X D (1..3) D (1..3) -- Y D D (1..3) -- -- So the actual subtypes are constrained. -- X is a constrained object because its nominal subtype is constrained -- and Y is an object constrained by its initial value. -- -- RM 3.10(10) -- -- Designated subtype of A and A (X'Range) and A (Y'Range) is D. -- -- RM 3.10.2(27/1) -- -- A's designated subtype shall statically match the nominal subtype -- of the view. -- -- RM 4.9.1 (2) -- -- Statically matching subtypes have statically matching constraints. -- -- AX: Expected type of X'Access is A. -- A's designated subtype D does not statically match X's nominal -- subtype D(1..3). -- -- BX: Expected type of X'Access is A(X'Range). -- A(X'Range)'s designated subtype D does not statically match X's -- nominal subtype D(1..3). -- -- AY: Expected type of Y'Access is A. -- A's designated subtype D does statically match Y's nominal subtype D. -- -- BY: Expected type of Y'Access is A(Y'Range). -- A(Y'Range)'s designated subtype D does statically match Y's nominal -- subtype D. __________________________________________________________ Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min. weltweit telefonieren! http://freephone.web.de/?mc=021201