I'd suggest using... DEF FUNCNAME PARAM RETURN RETVAL ...rather than... DEF FUNCNAME PARAM OUT RETVAL ...for functions with a single return value. It's a lot more straightforward in terms of the return value's initialization and the value returned itself.