Function return array

In reply to lalithjithan:

The syntax for function declarations does permit anything other than simple types and type names. So you must use a typedef name fore the return type.

typedef bit [7:0] byte_da_t[];
function byte_da_t payl(int length,int data_size,int data[]);