One problem with implementing this would be that VFP uses what is called a dynamic scope. What this means is that it cannot be known at compile-time which variables will be declared at any given point in a program. This is due to the private variables. For example, consider this legal program:
PROCEDURE Scope1
PRIVATE cTest
cTest = "Testing Scope"
Scope2()
ENDPROC
PROCEDURE Scope2
WAIT WINDOW cTest
ENDPROC
This would work just fine. However, if the procedure calling Scope2 did not define the variable cTest, then the program would fail. There is, obviously, no way for the compiler to know the order of procedure calls during runtime execution.
So, if one were to introduce something like option explicit in fox, one would also have to let the private (and public as well?) variables go, in my opinion.
Any thoughts on this?
Regards,
Eyvind.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only