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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d85498ce48b190f0,start X-Google-Attributes: gid103376,public From: matthewsj@saic.com (John B. Mattehws, M.D.) Subject: Slicing & sliding Date: 1999/04/23 Message-ID: #1/1 X-Deja-AN: 470088951 Content-transfer-encoding: 8bit Followup-To: comp.lang.ada Content-Type: text/plain; charset=ISO-8859-1 Organization: SAIC Mime-Version: 1.0 Reply-To: jmattthews@nova.wright.edu Newsgroups: comp.lang.ada Date: 1999-04-23T00:00:00+00:00 List-Id: Given the following program with Text_IO; procedure Slice is S : String (1 .. 64) := (others => '.'); function F return String is begin return "result"; end F; begin Text_IO.Put_Line(S); S(S'Range) := F(S'Range); Text_IO.Put_Line(S); end Slice; The output is ................................................................ result I was suprised to see that the indicated slice of F (F(S'Range)) is allowed to be larger than the result returned by F, despite RM 4.1.2(7). For smaller slices, the remainder of S seems to slide down, and the rest is padded with nulls. Can someone help me understand this? Is this conformant with the RM? Thanks, John ---- John B. Matthews, M.D. matthewsj@saic.com; jmattthews@nova.wright.edu