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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,992e84f408e149d8 X-Google-Attributes: gid103376,public From: Samuel Tardieu Subject: Re: How to initiate part of a string? Date: 1998/08/25 Message-ID: #1/1 X-Deja-AN: 384628203 References: <35E171AB.75CD@ddre.dk> <35e2dc46.1973509@SantaClara01.news.InterNex.Net> Mail-Copies-To: sam@ada.eu.org Content-Type: text/plain; charset=US-ASCII Organization: TELECOM Paris Mime-Version: 1.0 (generated by tm-edit 7.108) Newsgroups: comp.lang.ada Date: 1998-08-25T00:00:00+00:00 List-Id: Tom> Do you mean Tom> Tom> Txt : String(1 .. 100) := (1 .. 27=>' ', "abcd",31..100=>' '): This is not valid Ada. One way to do it is (as Mark wrote) is to put a pragma Elaborate_Body in the spec and initialize that part of the string in the body elaboration. Put I wouldn't have said "use pragma Elaborate_Body to keep the compiler happy", but instead "use pragma Elaborate_Body so that you know that the string have been initialized when you're using it from another package". Sam -- Samuel Tardieu -- sam@ada.eu.org