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.1 required=5.0 tests=BAYES_05,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: aidan@skinner.demon.co.uk (Aidan Skinner) Subject: Re: How to initiate part of a string? Date: 1998/09/29 Message-ID: #1/1 X-Deja-AN: 396043697 X-NNTP-Posting-Host: skinner.demon.co.uk:158.152.76.219 References: <35E171AB.75CD@ddre.dk> <35e2dc46.1973509@SantaClara01.news.InterNex.Net> <35e3675e.37587430@SantaClara01.news.InterNex.Net> <35e45c89.12901035@SantaClara01.news.InterNex.Net> <01bde7ac$91707760$5330ea9e@UKP014459.logica.co.uk> <360a8549.265252@SantaClara01.news.InterNex.Net> <6uevbf$nr4$1@nnrp1.dejanews.com> X-Complaints-To: abuse@demon.net X-Trace: news.demon.co.uk 907090342 nnrp-09:20221 NO-IDENT skinner.demon.co.uk:158.152.76.219 Organization: Huh? Newsgroups: comp.lang.ada Date: 1998-09-29T00:00:00+00:00 List-Id: On Fri, 25 Sep 1998 02:32:14 GMT, dewarr@my-dejanews.com wrote: >In article <360a8549.265252@SantaClara01.news.InterNex.Net>, > tmoran@bix.com (Tom Moran) wrote: >> >Txt: String(1..100) := (28..31=>"abcd", Others=>' '); >> It looks nice, but it doesn't compile. > >Clearly this is illegal, compare with the obviously legal > > Txt: String(1..100) := (28..31=>'x', Others=>' '); > >Clearly these cannot both be type correct. If you expect >the top one to compile, you don't have a precise view of >what is going on semantically. Would Txt: String(1..100) := (28..31 => 'a','b','c','d', Others => ' '); be a good compromise in this situation? it looks nice and keeps the same semantics. It then opens the possibility of Txt: string(1..100) := (28..31 => ('a'..'d'), Others => ' '); - Aidan -- HMFC - Scottish Cup Winners 1998 http://www.skinner.demon.co.uk/aidan http://www.gla.ac.uk/Clubs/WebSoc/~974075s/ "I don't patronise bunny rabbits"