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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: HELP | function Is_Open (File : File_Type) return Boolean; package ada.text_io Date: Tue, 27 Oct 2015 11:23:06 +0000 Organization: A noiseless patient Spider Message-ID: References: <7d129899-8c22-46a4-b94d-bc746c7fc458@googlegroups.com> <535556e1-bd6e-42b3-86e9-60c721582736@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="2d7699570724a9a82a760842267e2c56"; logging-data="27220"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nA4Lw1eN12pwbY5go+EiI1I3f3iSHyVo=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:AuqsLMoHQE6m/2g9iRpPZDR7I9c= sha1:u+Mtes78Ry0ENbOj+vjoOwqaw6E= Xref: news.eternal-september.org comp.lang.ada:28070 Date: 2015-10-27T11:23:06+00:00 List-Id: comicfanzine@gmail.com writes: > Le lundi 26 octobre 2015 11:22:01 UTC+1, comicf...@gmail.com a écrit : >> Can someone please post a simple code in which this function is used > , i'm lost , thanks . > > Thanks Niklas Holsti , > > I understand but partially , can you explain me in details those lines > please? i don't know what you mean by '''Log''' = is that kind of a > comment line ? : > > line 31 (procedure Ex_Is_Open) = Log ("This will not appear in the log."); > > line 44 (procedure Ex_Is_Open) = Log ("This will appear iff there are > command-line arguments."); > > line 55 (procedure Ex_Is_Open) = Log ("This will not appear in the log."); If you look at line 13 of Niklas's code you will see the declaration of 'procedure Log'. If you know C, then - a procedure is like a void function. But in any case, you need to work through a tutorial. There is a list of tutorials at http://www.adaic.org/learn/materials/#tutorials - but you may find AdaTutor (http://zhu-qy.blogspot.co.uk/2012/08/adatutor.html) more useful.