Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not overload method then wat?
Message
From
02/11/2002 23:42:49
 
 
To
02/11/2002 23:12:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00718248
Message ID:
00718251
Views:
16
John - this is pretty wide open.
You remember C++ templates for overloading?
You can accomplish something similar, based on your lparameters coming in.
1. you can pass different parameter types, and then check for both # of parameters and type() of parameters. a case statement comes to mind.
2. think about passing an object? then check for properties of the object.
whilst this way requires more thinking and overhead - the implementation and runtime eval is a bit more straightforward. you can even call methods in that object that are specific to the object..
3. Chris recommended an array - have u thought about that?

mondo regards [Bill]
>Hi,
>I have a function that need to have overload feature. Since VFP doesn;t support overload, how could I implement it?
>
>Print(cText, cAlighment)
>Print(cText1, cText2, ....)
>
>Any suggestion?
>
>Thank you
Previous
Reply
Map
View

Click here to load this message in the networking platform