Following up on
http://lists.wfu.edu/pipermail/gretl-devel/2015-December/006408.html
you can now give a default value of "null" for a matrix argument to
a user-defined function. Illustration of usage:
<hansl>
function scalar foo (matrix m[null])
return exists(m) ? tr(m) : NA
end function
eval foo(I(3))
eval foo()
eval foo(null)
</hansl>
Allin