15.06.2016, 13:36
Hi,
What is the most efficient way of testing for the table object returned by grp.tag? ie is it better to test for the existence of the table or the length or is there something else?
Thanks,
Roger
What is the most efficient way of testing for the table object returned by grp.tag? ie is it better to test for the existence of the table or the length or is there something else?
Code:
if (event.type=='groupwrite') then
local myvl = grp.tag({'VL0','vl'},'all')
if(myvl) then --existence
myvl:write(event.getvalue())
end
local myls = grp.tag({'VL0','ls'},'all')
if(#myls>0) then --length
if (event.getvalue() > 0) then
myls:write(true)
else
myls:write(false)
end
end
end
Roger