Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Same function name and the 2nd one is run?
Message
De
03/12/2004 04:38:12
 
 
À
02/12/2004 15:45:15
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows NT
Database:
Visual FoxPro
Divers
Thread ID:
00966500
Message ID:
00966621
Vues:
7
This message has been marked as the solution to the initial question of the thread.
>Pretend this is theoretical... <g>
>
>I have two exact-named functions in a PRG. A call at the top of the program will run the 2nd one, not the first, which I thought would be the logical choice. Anyone know why? Is this always the case?

the functions are inserted into a internal array in a LIFO order ( it is a stack ).
When VFP search a function it scan this stack,
then the last it is the first that VFP found and then use it.

A side effect:
the functions that are to the end of a PRG are those calls more quickly.

Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform