[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Help with sting compare?
- From: Adrian Sietsma <adrian_groups@...>
- Date: Fri, 19 Aug 2005 11:35:36 +1000
Ron Hudson wrote:
I can do this from interactive lua and it seems to work, but when I use
a lua program it does not work..
I am reading through a file that has variable length records, records
with a line containing only the "&". The last line in the file has "&&".
aline = read.io()
if aline == "&" then
count = count + 1
until aline == "&&"
Neither "&" or "&&" are ever detected.
I have checked the file... & and && are the only thing in the line.
I also have ">" .. aline .. "<" printed and see >&<
I don't get it... it should be straight forward.
try declaring aline before the repeat...until block.
i had a similar problem which this approach fixed - i surmised that it was a
variable scoping issue.