Jignesh,
Fundamentally the only difference in VFP is whether or not you want to use the return value. If you do you have to call it as a function.
do proc1
do func1
? proc1()
? func1()
procedure proc1()
return 1
function func1()
return 2
You should also look at the help topic for UDFPARMS.
>I have never used function, but I use procedure and it is returning value every time when I call it.