
3 Jul
2025
3 Jul
'25
4:34 p.m.
Am 03.07.2025 um 16:04 schrieb Henning Hraban Ramm:
Hi, I’m trying to get a simple function with a variable number of parameters working:
""" \startluacode interfaces.implement { name = "Autoren", public = true, arguments = { "hash" }, actions = function(t) logs.report('Autoren', 'interface got table of length ' .. #t) end } \stopluacode
\starttext
Info: \Autoren[text=Hans,melody=Hraban]
\stoptext """
The table t has always length 0. Where’s my error?
Do you see the difference? \starttext \startluacode a = { "one", "two", "three" } b = { x = "one", y = "two", z = "three" } context("Table a: " .. #a) context.par() context("Table b: " .. #b) \stopluacode \stoptext Wolfgang