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.107.15.214 with SMTP id 83mr19824349iop.16.1449917268897; Sat, 12 Dec 2015 02:47:48 -0800 (PST) X-Received: by 10.182.247.67 with SMTP id yc3mr320602obc.0.1449917268874; Sat, 12 Dec 2015 02:47:48 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!mv3no11595490igc.0!news-out.google.com!f6ni20649igq.0!nntp.google.com!mv3no11595479igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 12 Dec 2015 02:47:48 -0800 (PST) In-Reply-To: <6caaac83-bca4-4b75-a4b3-47189e281c1a@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=90.198.100.141; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS NNTP-Posting-Host: 90.198.100.141 References: <6caaac83-bca4-4b75-a4b3-47189e281c1a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <52a3a1e7-21ad-42b7-91ad-6cef89259a55@googlegroups.com> Subject: Re: Basics : many way to use a Procedure From: Lucretia Injection-Date: Sat, 12 Dec 2015 10:47:48 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:28783 Date: 2015-12-12T02:47:48-08:00 List-Id: On Friday, 11 December 2015 22:19:55 UTC, comicf...@gmail.com wrote: > Hello ! > > I'm seeing that some people use procedure with the sign " => " . > What is it ? Any documentation about this ? > > A example = > > Ada.Text_IO.Create ( > File => Log_File, > Name => "my_log_file.txt", > Mode => Ada.Text_IO.Out_File); It's called named parameter association. It allows you to change the order of the parameters passed to a function/procedure to one that makes reading easier or just your own preference. > which is very similar to the prototype : > > procedure Open > (File : in out File_Type; > Mode : File_Mode; > Name : String; > Form : String := ""); For example, given the proper context clauses: Open (Name => "hello.txt", File => My_File, Mode => In_File); or you can use it partially, as in: Open (My_File, Name => "hello.txt", Mode => In_File); > Also , is it possible to apply this kind of writing for this procedure ? = You can apply it to all functions/procedures. Luke.