Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LPARAMETERS in my Method
Message
From
30/04/1998 14:39:48
Ryan Hirschey
Federal Reserve Bank of New York
New York City, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00095960
Message ID:
00096081
Views:
21
If VFP had variable declaration similar to VB with 'option explicit' in which you could declare a parameter as a variable type, then this would be possible. Something like the following would be really nice: methodname(lcString as Character, ldDate as Date), etc. VB allows this quite easily. It would also expose the methods and the required parameters internally to the VFP application, or even in a type library. VFP has many things that are superior to VB, but this is one area in which VB has an edge, especially in ensuring you are passing parameters of the correct type. It simply makes debugging and coding that much easier. Because VFP doesn't do this, I list the parameters and their types (with additional comments on what should be supplied) in the comments for the method, but I would still like to see a more robust solution.

>repeating Craig's answer, how would vfp know what your custom methods are expecting? this should be stored in your documentation and in comments in the class so you can look up what you don't remember..
>
>>Craig,
>>
>>Wouldn't it be a nice feature if it let you specify what parameters a custom method should expect?
>>
>
>>>VFP only does this on methods where there are parameters. How is it supposed to know for custom methods?
Ryan Hirschey
Previous
Reply
Map
View

Click here to load this message in the networking platform