[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: expression as statement
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 17 Nov 2009 14:10:22 +0200
On Tue, Nov 17, 2009 at 2:02 PM, Juris Kalnins <juris@mt.lv> wrote:
> while #x do break end
> do local _ = #x end
> (function () return #x end)()
OK, assuming that '#' stands not for its usual meaning (in which case
first statement always returns immediately)
The second is definitely the best; is the idea to execute the
operation for its side-effect? Why go to the trouble of wrapping this
in a function?