Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving and Referencing SET PROC TO Setting
Message
From
23/02/2003 14:46:31
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00756634
Message ID:
00756770
Views:
21
>>>Mike,
>>>
>>>It'll only work in case where there's only one procedure file. For example,
* One procedure file
>>>SET PROCEDURE TO proc1
>>>lcProc = SET("PROCEDURE")   && proc1.prg
>>>SET PROCEDURE TO (lcProc) ADDITIVE
>>>* Two procedure files
>>>SET PROCEDURE TO proc1
>>>SET PROCEDURE TO proc2 ADDITIVE
>>>lcProc = SET("PROCEDURE")   && proc1.prg,proc2.prg
>>>SET PROCEDURE TO (lcProc) ADDITIVE   && generates an error
>>>
>>
>>Try it Sergey, it works as just SET PROC TO &lcproc, even if there is 2 or more proc files (with or without the ADDITIVE clause).
>
>Fred,
>You're right. It works but only with macro substitution.
SET PROCEDURE TO &lcProc
And another thing, the SET("PROCEDURE") return value even accomodates folder names with spaces properly, they're enclosed with quotation marks in the string value.
SET PROCEDURE TO "C:\Special Applications\test1"
SET PROCEDURE TO "C:\Special Applications\test2" ADDITIVE
cProcs = SET("PROCEDURE")
SET PROCEDURE TO
SET PROCEDURE TO &cProcs
cProcs contains ["C:\Special Applications\test1.fxp", "C:\Special Applications\test2.fxp"]

If your folder names aren't long names or have embedded spaces, the quotation marks aren't there.
SET PROCEDURE TO "C:\SpecApp\test1"
SET PROCEDURE TO "C:\SpecApp\test2" ADDITIVE
cProcs = SET("PROCEDURE")
SET PROCEDURE TO
SET PROCEDURE TO &cProcs
cProcs contains [C:\SpecApp\test1.fxp, C:\SpecApp\test2.fxp]
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform