Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicate Function
Message
De
16/12/2008 06:39:00
 
 
À
16/12/2008 06:33:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01367769
Message ID:
01367776
Vues:
6
OK
If I have big project and I want to add the ctl32 etc with classes\prg etc Its can make problem on this aspect or any other?

>VFP does not support what's called "overloading", which means that you must give each function an unique name. If you have more than one function with the same name, the last loaded function will overwrite the earlier function in cache, and be used.
>
>
>>Hi all
>>I heard abaout 'You can do with vfp what ever you want!'.
>>
>>This means that you can include same function twice?
>>
>>Please look on the following code:
>>
test1()
>>function test1
>>	a='First'
>>	messagebox(a)
>>endfunc
>>function test1
>>	a='Second'
>>	messagebox(a)
>>endfunc
>> You will get messagebox 'Second'.
>>
>>You will get 'Second'. also if you will add 'Set procedure to .. additive.
>>
>>For Example
>>
*prog1
>>Set procedure to prog2  additive
>>test1()
>>function test1
>>	a='First'
>>	messagebox(a)
>>endfunc
>>function test1
>>	a='Second'
>>	messagebox(a)
>>endfunc
>>
>>*prog2.prg
>>function test1
>>	a='Other'
>>	messagebox(a)
>>endfunc
>>
>>So, if vfp can do every thing, can I say to my dear fox to void duplicate function name?
>>Help please
Thank you
Chaim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform