Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function vs Procedure
Message
 
To
02/07/2002 11:36:07
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00671285
Message ID:
00674885
Views:
20
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform