Klas Engwall wrote:
> Chaz,
>
>> I can't get NG to run on my XP notebook, so I'm asking here instead.
>
> Download the excellent Windows-based NG replacement WEG from
> http://www.davep.org/norton-guides/
and you will be back in business.
>
>> I seem to recall that in the Nanfor file functions, there is a
>> seek/search function. I thought it was FT_FSeek( string ), but it's
not.
>> Can anybody elucidate?
>> Basically, I want to open a text file and search it for a specific
string.
>
> There is a whole group of functions for reading and writing text files
> where each line is considered to be a record. Things like FT_Fuse(),
> FT_Frecno(), FT_Fgoto(), FT_Freadln(), FT_Fskip() etc but no
> FT_Fseek(). You would have to do something like this (adapted from the
> NG) and inspect what FT_Freadln() returns:
>
> FT_FUSE( "text.c" )
> DO WHILE ! FT_FEOF()
> cRecord := FT_FREADLN()
> // Check cRecord for the string you are looking for
> FT_FSKIP()
> ENDDO
>
> Regards,
> Klas
>
> -------
> klas dot engwall at engwall dot com
>
> http://www.engwall.com/clipper/
>
> The LFN Library for Clipper
> The LanMan Library for Clipper
> The NFPAT1A Timeslice release patch for the Nanforum Toolkit
Hi Klas
thanks for the link to WEG... now installed. As you say, there is no
FT_FSeek function.... I'll just have to do it the long way. Cheers


|