Hi; I had the same problem and your solution almost worked. But I need to pass and return a 2D array (matrix) to a function in such a situation and have problem with returning matrix! Could you...