Difference between FUNCTION and PROCEDURE statements

Syntactically there is no difference between FUNCTION and PROCEDURE statements in VFP. In other languages, that have both statements, a function can return a value and a procedure cannot. In VFP the difference comes in the way a procedure/function is called. By default VFP passes parameters by value in call to the functions, by reference to the procedures ( DO ...) and only former allows for a return value.