General information
Category:
Coding, syntax & commands
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
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