...and, to round it all out, there are the parameters indicated within parentheses after the name on a FUNCTION statement. These are implicitly LOCAL too,although I couldn't find this documented in the (VFP7) Help for "FUNCTION Command".
>The LOCAL and LPARAMETERS command both declare variables as local. The difference is that LOCAL command initialazied it's variables to .F. and you change them by assigning new values. The variables declared in the LPARAMETERS commands get data from a calling program when a procedure, function, or method is called. You can assign values to them too but calling program would see those changes only if the parameters passed in by reference.
>
>>Is, in example, the LOCAL variable same as LPARAMETERS?
>>
>>
>>>>What is difference betwen variables (LOCAL, PRIVATE, PUBLIC) and PARAMETERS?
>>>The Local variables and variable arrays can be used and modified only within the procedure or function in which they are created. They are initialized to false (.F.).
>>>The Private command hides specified variables or arrays that were defined in a calling program from the current program. It doesn't create variables. The private variables are visible within the procedure or function in which they are created and all called progam/functions.
>>>The public variables in general all visible thru the application an initialized to false (.F.).
>>>The PARAMETERS statement declares parameters as PRIVATE.
>>>The LPARAMETERS statement declares parameters as LOCAL.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only