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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2f014c8802ae5d14 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-11 06:25:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.litech.org!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news100.image.dk!feed.news.nacamar.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: "Martin Krischik" Newsgroups: comp.lang.ada Subject: RE: sequential search Date: Mon, 10 Mar 2003 18:27:18 +0100 Organization: never organized Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 X-Trace: news.t-online.com 1047392575 02 23630 yYvREOxVSLAvtn 030311 14:22:55 X-Complaints-To: abuse@t-online.com X-ID: EqToDkZGZek8y2aMwdYFMkktrgAR+chUM7ymKrJFsC6z0dmnVvGpwa User-Agent: Pan/0.13.0 (The whole remains beautiful) Xref: archiver1.google.com comp.lang.ada:35197 Date: 2003-03-10T18:27:18+01:00 List-Id: > -----Original Message----- > From: David > > Does anyone know how a sequential/linear search is created under a txt > file (to find a specific word line by line). I have an idea how it is > done using an array, but not under a file. Any ideas? Since I had a similar Problem (I needed Search and Replace) I written a Library to do the job: http://adacl.sourceforge.net/ If you don't want to do the replace part then just have a Look at AdaCL-File-Reader-adb to see how the file is read: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/adacl/adacl/Include/AdaCL-SAR-File-ReadTask.ada?rev=HEAD&content-type=text/vnd.viewcvs-markup >From there on it is just normal string manipulation With Regards Martin -- Martin Krischik mailto://Martin@krischik.com http://ada.krischik.com