Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hidden method in PRG
Message
From
19/07/2005 08:38:58
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01033728
Message ID:
01033778
Views:
17
>I'm assuming that you've got multiple prg files and each of them contain a function or procedure that has the same name. The only other possible way to hide that subroutine, without taking the advice given to you already by Sergey and Cetin, is to change the order in which your Set Procedure To statements are in. Say you myprog1.prg and myprog2.prg and they both define a function called MyFunc(). If you're code is in the following order then the MyFunc() from myprog2.prg will be called...
>
>
Set Procedure to MyProg1
>Set Procedure to MyProg2 Additive
>
>...however if you reverse that then the MyFunc() in MyProg1.prg will be called instead...
>
>
Set Procedure to MyProg2
>Set Procedure to MyProg1 Additive
>

Craig, Are you sure ?

>In any event, it's probably not a good idea, but can be used to exert a measure of control over which function is called when there is a naming conflict such as you describe.
>
>>Hi all, I have put a couple of routines in a prg file, and many of them share use a common subroutine. That subroutine will only be called by those routines in that same prg file. Is there a way to make that subroutine "hidden" in that prg file, similar to the hidden method of a class? TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform