Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executing PRG in a specific folder
Message
From
11/02/2009 14:39:55
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01380936
Message ID:
01381026
Views:
61
First suggestion looks workable, altho it makes the called PRG a little awkward to work with ... instead of returning a result, it simply must modify one its parameters, correct?

Second suggestion won't fly, because i can't guarantee uniqueness.

>>How do I call a PRG that I know lives in a particular folder (which most likely is not in my search path) and return a result? Note that I have the full path to the PRG, and the path may contain spaces:
>>
>>lcPRG = "C:\Some Folder Name\SomePRG.PRG'
>>
>>lcResult = ??????
>>
>>Thanks
>
>
>lcPRG = "C:\Some Folder Name\SomePRG.PRG'
>DO (lcPRG) WITH ?????
>
>But you can't get a result when you use DO syntax.
>You may pass a variable as parameter and then check its value:
>
>lcPRG = "C:\Some Folder Name\SomePRG.PRG'
>lcResult = ""
>DO (lcPRG) WITH lcResult
>? lcResult
>
>But if you want to use that PRG as a function then you must add it first to SET PROCEDURE:
>
>
>lcPRG = "C:\Some Folder Name\SomePRG.PRG'
>SET PROCEDURE TO (lcPrg) ADDITIVE
>? lcResult = SomePRG()
>
>
>When you use this you must be sure that this PRG have unique name.
Jim Nelson
Newbury Park, CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform