<br><br><div class="gmail_quote">2012/1/23 Herbert Voss <span dir="ltr"><<a href="mailto:Herbert.Voss@fu-berlin.de">Herbert.Voss@fu-berlin.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
this works with Lua<br>
<br>
table.foreach(os.date("!*t"),<u></u>print)<br>
<br>
but when I replace print with tex.print I'll get<br>
an error because tex.print doesn't know how to<br>
handle the last boolean value of the date table.<br>
<br>
\directlua{table.foreach(os.<u></u>date("!*t"),tex.print)}<br>
\bye<br>
<br>
! LuaTeX error no string to print<br>
stack traceback:<br>
        [C]: ?<br>
        [C]: in function 'foreach'<br>
        <\directlua >:1: in main chunk.<br>
l.1 ...ua{table.foreach(os.date("!<u></u>*t"),tex.print)}<br>
<br>
<br>
I can handle the last table entry as a special case, no problem.<br>
But is there an easy way to catch a boolean value?<span class="HOEnZb"><font color="#888888"><br>
<br>
Herbert<br>
</font></span></blockquote></div><br>\directlua{table.foreach(os.date("!*t"),function(...) tex.print(tostring(...) end)}<br>\bye<br clear="all">untested<br>-- <br>luigi<br><br>