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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.13.251.70 with SMTP id l67mr777917ywf.87.1485431647921; Thu, 26 Jan 2017 03:54:07 -0800 (PST) X-Received: by 10.36.185.77 with SMTP id k13mr1707415iti.1.1485431647869; Thu, 26 Jan 2017 03:54:07 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!2.eu.feeder.erje.net!feeder.erje.net!2.us.feeder.erje.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder1.iad1.usenetexpress.com!216.166.98.84.MISMATCH!border1.nntp.dca1.giganews.com!nntp.giganews.com!i7no252747qta.1!news-out.google.com!w39ni6895qtc.1!nntp.google.com!q58no253108qte.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 26 Jan 2017 03:54:07 -0800 (PST) In-Reply-To: <88df1d97-6f7a-410f-8d1b-fa1d3ee44ea7@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=156.67.141.138; posting-account=3Fg1FgoAAACfsmWScNfMD1tGFhR4DU0o NNTP-Posting-Host: 156.67.141.138 References: <5a19787c-a11c-470e-8cef-2c5dc4897bf7@googlegroups.com> <23d8f4a2-867e-4fae-b056-952039ab0732@googlegroups.com> <88df1d97-6f7a-410f-8d1b-fa1d3ee44ea7@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <712de11c-94ae-4703-8cfb-9ff2decccaeb@googlegroups.com> Subject: Re: Ada.Numerics.Long_Real_Arrays From: hnptz@yahoo.de Injection-Date: Thu, 26 Jan 2017 11:54:07 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:33173 Date: 2017-01-26T03:54:07-08:00 List-Id: On Thursday, January 26, 2017 at 8:47:07 AM UTC+1, Simon Wright wrote: > hnptz@yahoo.de writes: >=20 > > I have nm_G.ads, nm.ads, nm.adb and test_nm.adb, and I want to specify > > Np in test_nm.adb only, How can it be made possible ? >=20 > The thing is, you've supplied code examples that wouldn't even begin to > compile because you've cut out so much and replaced with > english-language text. The result is that we have no real idea what > you're talking about. I have conducted four files: 1. file nm_g.ads: with Ada.Numerics.Long_Real_Arrays;=20 generic=20 =C2=A0 Np : Positive;=20 package Nm_G is=20 =C2=A0 =C2=A0subtype R_Vector=20 =C2=A0 =C2=A0 =C2=A0is Ada.Numerics.Long_Real_Arrays.Real_Vector (1 .. Np);= =20 =C2=A0 =C2=A0type R_Matrix is array (1 ..Np+1) of R_Vector;=20 end Nm_G;=20 2. file nm.ads: with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays; with nm_g; package nm is =E2=80=A6 generic with function f(R : R_Vector) return Long_Float; procedure fnm ( P : in out R_Matrix); =E2=80=A6 end nm; result: R_Matrix is not visible. But I don=E2=80=99t know Np at this moment= . 3. file nm.adb: package body nm is =E2=80=A6 procedure fnm ( P : in out R_Matrix) is =E2=80=A6 end fnm; end nm; result: R_Matrix is not visible. But I still don=E2=80=99t know Nt at this = moment. 4. file test_nm.adb with nm; use nm; procedure test_nm is Np : Positive :=3D 2; P : R_Matrix :=3D ((1.0,2.0),(3.0,4.0),(5.0,6.0)); begin fnm(P); end test_nm; result: cannot work I admit this is only the way, I would like to set up the project. However, = using an array of Real_Vectors may require a different approach.