Re: I need help! (again :>)
- Posted by Joseph Martin <joe at CYBER-WIZARD.COM> Jun 03, 1997
- 1004 views
> > The problem is that find returns the postion at which > the find was made. > If find didn't find anything then it found it at 0. > or nowhere. > > find returns WHERE or 0 > not -1 > > find never returns -1 Granted. I forgot that. > >for i = 1 to length(file) do > > n = find("1", file[i]) > > if n != -1 then > > should be changed to > > for i = 1 to length(file) do > n = find("1", file[i]) > if n then > OR > > for i = 1 to length(file) do > n = find("1", file[i]) > if n > 0 then > OR > > for i = 1 to length(file) do > n = find("1", file[i]) > if n != 0 then > My real problem is that the keyword is in the file and "find" doesn't find it!