In reply to shatrish:
Return values and output arguments are independent features of a function.
You call functions with return values as part of an expression, or as an expression by itself.
function bit my_function;
if (my_function() !=0) ...
You call functions with no return value as a procedural routine that is guaranteed not to consume time (as opposed to a task, which is allowed to consume time).
In either case, you could have output arguments to your function. But here are some things to consider. When using an output argument, you must declare a variable to receive the value. \\
function void my_function(output bit value);
value = ...
if (test) ...
If all you want to do is test the value, it is much easier to use the return value. However, there is only one return value for a function; so if you have more than one value to return, you must use output arguments.
There are a number of places in the LRM (e.g. using a function in a random constraint) that restrict the use of output arguments. These are so-called pure functions where return value must be solely defined as a result of the inputs to a function.