Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing parameters to a function
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Passing parameters to a function
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01365569
Message ID:
01365569
Vues:
65
Hi,

I have a generic function called something like OpenForm(). The function currently receives 2 parameters tcClassName, and tcClassLib. Then function opens a form as the following:
objForm = NEWOBJECT( tcClassName, tcClassLib )
Now I want to add some parameters to the function OpenForm() so that they would be passed to NEWOBJECT(). But it has to be generic since in some places no parameters would be required. And in some others it will be 1 parameters, 2, etc. Say, I want to limit to 3 parameters. So I will add 3 more parameters to the function OpenForm(). But not all of them should be passed to the NEWOBJECT(). Short of creating DO CASE with a CASE depending on how many parameters were received (using PCOUNT())by OpenForm(), is there a way to do it generically?

Thank you in advance for any suggestions.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform