[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: assignments in expressions?
- From: "Ashley Fryer" <lua@...>
- Date: Thu, 11 Jan 2001 13:12:20 -0800
Now that we have a "break" statement, you can eliminate the duplicate
assignment by doing this:
while 1 do
c = f()
if c == 1 then break end
print(c)
end
-----Original Message-----
From: Steve Williams
Sent: Thursday, January 11, 2001 12:56 PM
Subject: Re: assignments in expressions?
What is wrong with this way? It is no different in functionality and easier
to understand.
c = f()
while c == 1 do
print(c)
c = f()
end