return index of list’s defined fields
k=definedfields(l)
:l a list , tlist or mlist variable. : :k a vector of index. :
If l is a list tlist mlist k=definedfields(l) returns in k the indices of the defined list fields. This function is useful because indexing undefined fields produces an error.
l=`list`_(1);l(3)=5
k=definedfields(l)
t=`tlist`_('x');t(5)=4
definedfields(t)
m=`mlist`_(['m','a','b']);m.b='sdfgfgd'
definedfields(m)