this works with Lua

table.foreach(os.date("!*t"),print)

but when I replace print with tex.print I'll get
an error because tex.print doesn't know how to
handle the last boolean value of the date table.

\directlua{table.foreach(os.date("!*t"),tex.print)}
\bye

! LuaTeX error no string to print
stack traceback:
        [C]: ?
        [C]: in function 'foreach'
        <\directlua >:1: in main chunk.
l.1 ...ua{table.foreach(os.date("!*t"),tex.print)}


I can handle the last table entry as a special case, no problem.
But is there an easy way to catch a boolean value?

Herbert

Reply via email to