Re: setfenv/getfenv
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: setfenv/getfenv
- From: Peter Odding <peter@...>
- Date: 2010年1月19日 16:11:13 +0100
Tobias Kieslich wrote:
That shall be easy enough to write. Now for hash tables the "if empty"
expression is not as easy but that always depends on the situation.
Please ignore me if this makes no sense (I've never used/needed a
templating engine in Lua), but wouldn't the following "if" condition
suffice for hash tables that are empty?
<elem l:for="i,v in ipairs(table)" l:strip="">
<b>${i}.</b> <span>${v}</span>
</elem>
<elem l:if="next(table)==nil">
It was just empty, too bad :(
</elem>
- Peter Odding