b=2
c=myfunc(b)
? c
do myproc with 5
** in VFP5.0 u can also call them liek that
** (or so I've heard...)
myproc(5)
myfunc(5)
** note the myfunc is definesd as a procedure and myproc is
** defined as a function
procedure myfunc
lparam a
return a+1
function myproc
lparam a
? a+1
return
>>functions and procedures in fox <s>
>In C, for example, the difference between them is only in the mind of the programmer, not in the sintax of the language
though in C there is no entity specifically known
as a procedure the difference is by the definition
of procedures vs. function
void proc1 {....} is a procedure
anything that returns a value (e.g. int func1 {...})
is a function
while in fox as the previous example shows u can define
a procedure to act just as a function
also
if u'll look at the help in the manuals on procedures and functions - u will not find significant differances
Arnon Gal-Oz