Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function vs Procedure
Message
 
À
02/07/2002 11:36:07
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00671285
Message ID:
00674885
Vues:
19
Sony,

It is the way you call the code that makes it behave one way or the other, not the way you declare it.
FUNCTION Junk
lcVar = "Hello"
RETURN lcVar
ENDFUNC

PROCEDURE Junk
lcVar = "Hello"
RETURN lcVar
ENDPROC
The preceeding are exactly the same ion the way they will behave when called. If you call them with DO ... then they act like procedures and if you call them with Junk() they behave like functions.

JimB

>Functions and procedures are similar except in that a procedure does a job and returns and function does the job and returns a value(in theory). However, now they are used interchangeably.
>
>
>Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform