This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

result of grp.tag
#1
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?


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
Thanks,


Roger
Reply


Messages In This Thread
result of grp.tag - by rocfusion - 15.06.2016, 13:36
RE: result of grp.tag - by admin - 15.06.2016, 13:43
RE: result of grp.tag - by rocfusion - 15.06.2016, 13:45

Forum Jump: