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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,ae8b13d4d815893c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!v23g2000pro.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: (Num_Types.Mod_4 range 1..8) ------->why not (1..8)? Date: Mon, 18 May 2009 13:50:06 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <0571282b-0ab8-4eee-941f-e9369f5b4518@x6g2000vbg.googlegroups.com> <4a11b8cb$0$32680$9b4e6d93@newsspool2.arcor-online.net> <6b5fe400-2564-4fc9-a5bf-f83d1e476345@q14g2000vbn.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1242679806 3075 127.0.0.1 (18 May 2009 20:50:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 18 May 2009 20:50:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v23g2000pro.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5910 Date: 2009-05-18T13:50:06-07:00 List-Id: On May 18, 12:58=A0pm, convergence82 wrote: > Thanks. =A0I'm looking at a Ada.Unchecked_Conversion function that > converts from Data_Array_1 to Data_Array_2: > > type Data_Array_1 is array (Num_Types.Mod_4 range 1..8) of > Num_Types.Mod_8; > type Data_Array_2 is array (1..8) of Num_Types.Mod_8; > > I would think that the way the array is indexed is (integer, mod_4, or > whatever) wouldn't matter (it's the datatype of the elements of the > array that matter). > > So, will the convert function really in effect DO NOTHING but copy the > data over? Yes. In this case, though, a normal type conversion should work. There's no reason to use Unchecked_Conversion. -- Adam