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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,3a2f76c3562b7f58 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Charmed Snark Newsgroups: comp.lang.ada Subject: Re: type String_Type array(Integer range <>) of Character; Date: Fri, 16 Apr 2010 20:53:09 +0000 (UTC) Organization: The Snarky Insanitorium Message-ID: References: Injection-Date: Fri, 16 Apr 2010 20:53:09 +0000 (UTC) Injection-Info: feeder.eternal-september.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="7179"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19HtazJnlwQzKmcg476nog9CP5tlLpaxTo=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:vhkagjqNCqS51ALlYBaTFo0fmVE= Xref: g2news1.google.com comp.lang.ada:10029 Date: 2010-04-16T20:53:09+00:00 List-Id: J-P. Rosen expounded in news:hqahb1$tnm$1@news.eternal-september.org: > stefan-lucks@see-the.signature a �crit : >> Convert S into a variable of type String_Type with String-compatible >> bounds, and then convert that variable into a String: >> >> S : String_Type := "Abc."; >> T : String_Type(1 .. S'Length) := S; >> U : String(1 .. S'Length); >> begin >> U := String(T); Put_Line(U); -- or just Put_Line(String(T)); >> > No need for intermediate copy, just use an appropriate subtype: > > S : String_Type := "Abc."; > T : String(1..4); > subtype Slide is String_type (T'Range); > begin > T := String(Slide(S)); Great- thanks. Fast service too :) Warren