comp.lang.ada
 help / color / mirror / Atom feed
From: "Martin Krischik" <Martin.Krischik@T-Online.de>
Subject: RE: sequential search
Date: Mon, 10 Mar 2003 18:27:18 +0100
Date: 2003-03-10T18:27:18+01:00	[thread overview]
Message-ID: <pan.2003.03.10.17.27.14.615616@T-Online.de> (raw)
In-Reply-To: mailman.8.1047301771.32742.comp.lang.ada@ada.eu.org

> -----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




  reply	other threads:[~2003-03-10 17:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-10 13:09 sequential search Beard, Frank Randolph CIV
2003-03-10 17:27 ` Martin Krischik [this message]
     [not found] <87C00083D21D6944A12CB3F8C22DBEEE18821B@NAEAWNYDEX08VA.nadsusea.nads.navy.mil>
2003-03-10 14:13 ` David C. Hoos
  -- strict thread matches above, loose matches on Subject: below --
2003-03-09 18:08 David
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox