Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameter by reference
Message
From
06/10/1998 16:40:27
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00144309
Message ID:
00144374
Views:
21
Hi David,
Thanks for the tips you sent me. But when I modified the code by including the '@' Visual Foxpro 5 return a syntax error. If I remove the '@' then it is able to compile. Do you know why?

>Steve,
>
>lnValue = 1
>do shortmenu with "A", "B", @lnValue
>? lnValue
>
>in shortmenu:
>lparameter pcParamter1, pcParameter2, rnParameter3
>
>rnParameter3 = rnParameter3 + 1
>
>FWIW I use r to indicate reference parameters and p for parameters passed by value, I think it helps to indicate those things that can be cahnged by the function.
>
>>I have a shortcut menu that call from a form. In the setup of the shortcut menu I have LPARAMETER cParameter1, cParameter2, nValue1 and in the calling function I passed the following: DO shortmnu WITH 'A', 'B', 1
>>
>>When the shortcut menu launch I pressed one of the prompt option and inside the procedure of this prompt I have change the nValue to a 2.
>>
>>How could I pass back the nValue = 2 to the calling function?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform