Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The FUNCTION Command - deficiencies
Message
 
À
19/05/2002 19:06:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Documentation de produit
Divers
Thread ID:
00658635
Message ID:
00660107
Vues:
12
>To my knowledge there is NO difference whatever between a PROCEDURE and a FUNCTION. A PROCEDURE can return a value and will return .T. in the absence ofa value, just ike a FUNCTION.
>However, there is an important difference depending on HOW either is invoked.
>Invoked through a DO, each PARAMETER is passed by reference unless enclosed in parentheses. So the command:
>DO FuncOrProc WITH A1, (B2), C3
>will have both A1 and C3 passed by reference and B2 passed by value.
>To get the same through a function 'call' would take:
>=FuncOrProc(@A1, B2, @C3)
>and I believe that a method call works the same way.
>
>As for method calls needing the parens or not, I'm not sure any more because I seem to occasionally get an error in VFP7 where I don't recollect similar in VFP6. So I now code parens on ALL my method calls, regardless.
>
>Finally, I didn't mean to say that there is a difference in the LOOKUP of a name depending on whether it is a PROC or FUNC. Can you clarify how you interpreted such?
>
>Cheers
I read this in an earlier post:
"When you issue DO with a function name, Visual FoxPro searches for the function in a specific order as follows:" ...
and took it to mean that their "are" threading issues specific to FUNC // PROC. I take it that you meant something else!
Terry
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform