If it equals?

Kee Nethery kee at kagi.com
Thu Aug 22 13:19:01 EDT 2002

>This is the most efficient way but you could use a repeat loop do go 
>through each line of the file.  Use open file and read from file to 
>get the data into a variable then loop through each line comparing 
>the entered name to the login name.  If you only had one name per 
>line then the loop might look like this:
>repeat i = 1 to the number of lines in myFile
>   if loginname is equal to line i of myFile then
>     -- the login name exists
>     -- do stuff here
>     exit repeat
>   end if
>end repeat
>Hopefully this will get you started.

My favorite method is to put a return at the top of the file and then see if
return & <the name> & return is in the file
No need to know which line, just if it is there (assuming you do not 
also store a password in the file and need to verify that).

kee Nethery

>>     I am trying to make a easy Log-In system. I have a big list of 
>>Names in a Text file. What I want it to do,
>>when you enter your name to Log-In, it will check the text file to 
>>make sure that name is in the Text File, if
>>not, it won't let you log in. I don't know how to come about on 
>>doing this. Any ideas how to do this? Thanks!
>>  - Josh Dye
>use-revolution mailing list
>use-revolution at lists.runrev.com

More information about the Use-livecode mailing list