Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Not overload method then wat?
Message
De
02/11/2002 23:42:49
 
 
À
02/11/2002 23:12:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00718248
Message ID:
00718251
Vues:
17
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform