Is there better way how to create function returning array than:
function foo
Dim bar(1 to 2)as double
bar(1)=1
bar(2)=2
foo=bar
end function
and in code:
arrayx=foo
Because when I declare Dim arrayx(1 to 2) as double
it throws an error "can't assign array" When I don't declare the variable arrayx it doesn't seem to have any problems.