Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do FunctionName.prg
Message
From
13/05/2021 14:24:12
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01680170
Message ID:
01680407
Views:
39
>>>Hi,
>>>
>>>Is there a way to make sure that when you have code:
>>>
>>>do ProcedureName.prg
>>>
>>>Fires from a program? For example, say the ProcedureName() is in MyPrograms.prg. Just like when you use NEWOBJECT() you specify the library name (VCX) and the class name.
>>>Is
>>>
>>>SET PROCEDURE TO MyPrograms additive
>>>
>>>is the only way?
>>>
>>>TIA
>>
>>Why are you arbitrarily storing multiple procedures/functions in a single .prg? This does not help the compiler. If you build separate .prgs per function the exe will run them faster, than if it has to dig into other files first.
>
>Are you suggesting not even name the function inside the PRG (if there is only one function inside a PRG)? And just call it by the .PRG name?

If you have 10 functions that each do exactly what they must - and each are in the exe versus having 5 in one library and 5 in another and you use code:

set procedure to library2
?somefunctionfromlib2.

it will take longer. If you pre-open the libraries, then according to the exe, all the functions are immediately available to the computer. So why are they in libraries?

I already know the functions I want to call. Their storage at design time is irrelevant.
Previous
Reply
Map
View

Click here to load this message in the networking platform