Searching All Lines

Jan Schenkel janschenkel at yahoo.com
Fri Aug 23 01:14:01 EDT 2002


Hi Josh,

Here's a slight variation on the approach. If you
chnge the line format a bit so that it's
<TAB>UserName<TAB>EncodedPassword

Instead of goin through the entire file, line per
line, you can search for the line containing the
UserName with :
  get lineOffset(tab&UserName&tab, the_file)

"it" will be 0 if the UserName is not in the file.
Otherwise, to obtain the encoded password, use :
  get item 2 of line it of the_file

Hope this helped,

Jan Schenkel.

"As we grow older, we grow both wiser and more foolish
at the same time."  (De Rochefoucald)

--- Josh Dye <Zzyzx at Relia.Net> wrote:
> I made sure that they were "L"s, and it still
> doesn't work. They were "L"s
> the whole time. Anyone got any other ideas on how to
> search all of the
> lines?
> 
>  - Josh Dye
> 
> 
> ----- Original Message -----
> From: "J. Landman Gay" <jacque at hyperactivesw.com>
> To: <use-revolution at lists.runrev.com>
> Sent: Thursday, August 22, 2002 4:45 PM
> Subject: Re: If it equals?
> 
> 
> > "Josh Dye" <Zzyzx at Relia.Net> wrote:
> >
> > >   repeat for each line 1 in the_file
> > >     if item 1 of 1 is the_user then
> > <snip>
> > > It works. But, it is not searching all of the
> lines. It only works for
> the
> > > first line. Any ideas how to get it to search
> all of the lines?
> >
> > That's an "el", not a "one". Like this:
> >
> >   repeat for each line L in the_file
> >     if item 1 of L is the_user then...
> >
> > That's a common misunderstanding on lists where
> most everybody is using
> > a monospaced font. Els and ones look the same.
> >
> > To be honest, I'm kind of surprised it worked at
> all. :)
> >
> > --
> > Jacqueline Landman Gay         |    
> jacque at hyperactivesw.com
> > HyperActive Software           |    
> http://www.hyperactivesw.com
> >
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com
> >
>
http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
>
http://lists.runrev.com/mailman/listinfo/use-revolution


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com



More information about the use-livecode mailing list