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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: basic question on Ada programming Date: Wed, 23 Jan 2019 21:59:24 -0600 Organization: Aioe.org NNTP Server Message-ID: Reply-To: nma@12000.org NNTP-Posting-Host: 6AgfhBpunBzgkBte3Gzrmw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 X-Notice: Filtered by postfilter v. 0.8.3 X-Mozilla-News-Host: news://nntp.aioe.org:119 Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:55352 Date: 2019-01-23T21:59:24-06:00 List-Id: I forgot these since I did not program in Ada for long time. Very basic question. In this --------------------------- with Ada.Text_Io; with Ada.Numerics.Real_Arrays; procedure main is A : constant Ada.Numerics.Real_Arrays.Real_Matrix := (( 1.0, 2.0, 3.0), ( 4.0, 5.0, 6.0), ( 7.0, 8.0, 9.0)); v : constant Ada.Numerics.Real_Arrays.Real_Vector := (1.0,2.0,3.0); procedure put (x : Ada.Numerics.Real_Arrays.Real_Vector) is begin FOR e of x LOOP Ada.Text_Io.put_line(float'image(e)); END LOOP; end put; --use Ada.Numerics.Real_Arrays; begin put(A*v); -- error here, since it does not see * end main; ------------------ How can I write put(A*v) above, without having to do use Ada.Numerics.Real_Arrays; above it? I am trying to see if I can avoid doing use Ada.Numerics.Real_Arrays so that I can explicitly add Ada.Numerics.Real_Arrays.something every where, so I know where the something is coming from when looking at the code. But what about the *? How to tell Ada it is coming from Ada.Numerics.Real_Arrays without doing an explicit use? What would the syntax be? Using gnat community 2018. Thanks --Nasser