Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Same function name and the 2nd one is run?
Message
From
03/12/2004 04:38:12
 
 
To
02/12/2004 15:45:15
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00966500
Message ID:
00966621
Views:
8
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
Previous
Reply
Map
View

Click here to load this message in the networking platform