function

hey I have a simple subroutine which would take all the input parameters and construct a string, the problem is I don't know how to return this string to the caller. thanks

Something like this?

#!/usr/bin/ksh

func1() {
        echo "this has been returned from a function"
}

# main script
retval=$(func1)
echo $retval