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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ea884956d1f3b172 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!news.mixmin.net!.POSTED!not-for-mail From: Kulin Remailer Newsgroups: comp.lang.ada Subject: Re: How do I use GNAT.Directory_Operations.Iteration? Date: 15 Mar 2011 17:51:08 -0000 Organization: Kulin Remailer Message-ID: References: Injection-Info: news.mixmin.net; posting-host="01ba22ccb67a79b841276309123c180a"; logging-data="12525"; mail-complaints-to="abuse@mixmin.net" Comments: X-Remailer-Contact: abuse@reece.net.au (English Only Please) Xref: g2news1.google.com comp.lang.ada:18217 Date: 2011-03-15T17:51:08+00:00 List-Id: > > http://www.iuma.ulpgc.es/users/jmiranda/gnat-rts/rts/g-dirope__ads.htm Thank you. > There's a discussion of the use of generic formal subprograms at > http://en.wikibooks.org/wiki/Ada_Programming/Generics#Generic_formal_subprograms Thank you. > Agreed, to some extent. Though it'd only really be helpful here if you'd > never come across generic formal subprograms before. The comments in the > spec (the secret GNAT documentation!) seem pretty explicit, aside only > from the language detail that the OP had trouble with. Well I have instantiated generics for text io, enumeration io etc but this iteration generic threw me for a loop (pun intended!) Maybe it was the double indirection. First you have to define a procedure and then instantiate the generic with your procedure. I guess I have only understood how a type is given to instantiate a generic, not a procedure. The package spec does explain how to use the API as far as I can see, not having tried it yet. The issue for me is not knowing Ada enough.