Proper way to return a string



I am wrapping (because I cannot find it already done, if you know of one
that exists let me know!) libpq for PostgreSQL database access. A
function, PQresStatus returns a string version of the result status. In
returning this to Fortran, can I return it from a function call? Should
I? Should I use a subroutine, I know how to easily deal with giving
string information back that way.

I guess I am still trying to understand when I should use a function
and when I should use a subroutine with inout/out parameters.

Jeremy
.