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 X-Google-Thread: 103376,ea884956d1f3b172 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: How do I use GNAT.Directory_Operations.Iteration? Date: Tue, 15 Mar 2011 04:27:54 -0700 Organization: Aioe.org NNTP Server Message-ID: References: <1qu5ftcmzm7ib$.1136j6nf4hmwu.dlg@40tude.net> <6aeb51a133df5c661bc550bfb036b6b4@dizum.com> <28b47ca7-734d-4373-ad49-bfe36e00719d@l14g2000pre.googlegroups.com> Reply-To: nma@12000.org NNTP-Posting-Host: tUYQ4Ty9mMw9Pdc8TJRFQA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news2.google.com comp.lang.ada:19179 Date: 2011-03-15T04:27:54-07:00 List-Id: On 3/15/2011 4:15 AM, Simon Wright wrote: > > The actual documentation is at > http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gnat_rm/GNAT_002eDirectory_005fOperations_002eIteration-_0028g_002 >ddiopit_002eads_0029.html#GNAT_002eDirectory_005fOperations_002eIteration-_0028g_002ddiopit_002eads_0029 > (gosh, what a URL! might be better to start here: > http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gnat_rm/The-GNAT-Library.html#The-GNAT-Library > and look for g-diopit.ads) > Yes, I know about those, and have visited them, but they do not have the source code? All what it says: "9.56 GNAT.Directory_Operations.Iteration (g-diopit.ads) A child unit of GNAT.Directory_Operations providing additional operations for iterating through directories." But how to use it? The same link for the gcc part, I looked at also. I was looking for the source code, to get an idea how to call it. > and it's not helpful (specially to a newcomer). > > There's a discussion of the use of generic formal subprograms at > http://en.wikibooks.org/wiki/Ada_Programming/Generics#Generic_formal_subprograms > >> When I write something myself, I try to always put a small example >> at the top, as part of it documentation, of how to call or use it. >> It would be nice if these had such examples. > > 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, considering that Ada is used very little relatively speaking, then one can say that almost all programmers can be classified as Ada newbies. So, having documentation readily available on how to call or use something will make it easier for the rest of use to start using Ada, else a newbie can get frustrated and drop it. Many of us learn better by seeing examples, I know I do. --Nasser