[luatex] First (optional?) arguments of tex.getcount and friends.
taco at elvenkind.com
Tue May 10 15:44:48 CEST 2011
On 05/10/2011 03:42 PM, Paul Isambert wrote:
> Hello all,
> I have noticed that the function tex.getcount() and similar can take any
> number of arguments and ignore them all but the last. E.g.:
> texio.write_nl(tex.getcount("a string", nothing, node.new(11), 55, 0))
> returns "1", i.e. the value of count 0, ignoring the string, the nil
> value, the node, and the number.
> Is that normal? Am I missing something? My LuaTeX is 0.71.
I am not surprised: lua pushes the arguments on a stack, and then the
getcount function takes the topmost entry. I could add an explicit
test for the number of arguments, but that is a bit of wasted effort,
in Hans' and my opinion.
More information about the luatex