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.8CY+6uh2Yy7UMoq5lO7hbA.user.gioia.aioe.org!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: Mariner 1 / FORTRAN bug Date: Fri, 9 Aug 2019 09:27:22 -0500 Organization: Aioe.org NNTP Server Message-ID: References: <1992Dec4.141816.1@happy.colorado.edu> <86986725-f34e-46d7-9efc-d15d94379048@googlegroups.com> <97509e4d-05b9-4b6a-ab12-613abbe562b0@googlegroups.com> <011db4d7-3455-407d-9a1d-aa747d35c538@googlegroups.com> Reply-To: nma@12000.org NNTP-Posting-Host: 8CY+6uh2Yy7UMoq5lO7hbA.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.8.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:57019 Date: 2019-08-09T09:27:22-05:00 List-Id: On 8/9/2019 3:38 AM, Maciej Sobczak wrote: >> But outside of mathematical formulas, can you give an example of >> single-character error in Ada? > > with Ada.Text_IO; > > procedure Test is > > procedure P (I, J : Integer) is > begin > Ada.Text_IO.Put_Line ("Killing people"); > end; > > procedure P (f : Float) is > begin > Ada.Text_IO.Put_Line ("Not killing people"); > end; > > begin > P (1,2); -- or should it be P (1.2); ? > end; > > And of course we have to implement the Initialise operation for our Controlled types, right? > That is why using named arguments is better and also more clear P (I=>1, J=>2); No chance to mix it up with P (f=>1.2); --Nasser