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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2a3157e5254b8223 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 22 Aug 2008 21:50:08 -0500 From: "Steve" Newsgroups: comp.lang.ada References: <5886ab95-8744-4b72-b911-e4cb8889c7e7@d1g2000hsg.googlegroups.com> Subject: Re: Array slices and types Date: Fri, 22 Aug 2008 19:50:17 -0700 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Message-ID: X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 24.20.111.206 X-Trace: sv3-b65Vp7pZaQq6lhr6k7Rf73GWDVPBUM5KyuiMsGGzKgGw3kDWVzzlQlaam+THCHPE0qILt79mQZk2VSy!a3bNkNb5HSH7a28O+iH3HIbTqXl9rWJjyze8DGGzOSLd4+OBjiP6I9rpVoXUppbNVCvCChQWVONK!YvhmOGwGhN5J9f7NRqn/52jQNLW3GA== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Xref: g2news2.google.com comp.lang.ada:7504 Date: 2008-08-22T19:50:17-07:00 List-Id: "Maciej Sobczak" wrote in message news:5886ab95-8744-4b72-b911-e4cb8889c7e7@d1g2000hsg.googlegroups.com... > Consider this: > > type Name is new String (1 .. 10); > > N : Name; > > Some_String : String := "abc"; > > How can I assign Some_String to the beginning slice (ie. to the first > three characters) of N? > Everything that I can think of (short of copying characters > individually) hits the type compatibility problem. If you can change the definition of Name to: subtype Name is String( 1 .. 10 ); Then of course you can use: N( 1 .. 3 ) := Some_String( 1 .. 3 ); But that doesn't sound like what you're looking for. Regards, Steve > > -- > Maciej Sobczak * www.msobczak.com * www.inspirel.com > > Database Access Library for Ada: www.inspirel.com/soci-ada