In reply to xfinity:
Your function definitions seem odd. LRM Section 13.4.1 discusses return values and void functions:
A function should be defined as: function <return_type_or_void> <function_name>(<function_arguments>)
Without <return_type_or_void>, the return type is a single bit. A ‘void’ type means that the function won’t return a value.
A function will implicitly declare an internal variable named function_name of the type return_type.
You would need to show the exact code and explain the issue you are having.