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: Mark A Biggar Subject: Re: How to initiate part of a string? Date: 1998/08/25 Message-ID: <35E2E5DA.E5F59382@lmco.com>#1/1 X-Deja-AN: 384596449 Content-Transfer-Encoding: 7bit References: <35E171AB.75CD@ddre.dk> Content-Type: text/plain; charset=us-ascii Organization: Lockheed Martin Western Development Labs Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-08-25T00:00:00+00:00 List-Id: Hans Marqvardsen wrote: > I have a package GLOBALS, > containing global types and variables, > (but no procedures or functions). > > package Globals is --among other things > Txt: string (1..100); > end Globals; > > Is there a clean way to specify an initial value for a slice of Txt ? If you realy intend that the rest of the string be undefined, then you can always do it in a package body like so: package body Globals is begin Txt(1..6) := "abcdef"; end Globals; You will also need to add a pragma Elabotate_Body; to the package spec to keep the compiler happy (Ada 95). -- Mark Biggar mark.a.biggar@lmco.com