Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do FunctionName.prg
Message
De
13/05/2021 03:02:11
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01680170
Message ID:
01680352
Vues:
53
>>>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?

You noticed FUNCTION / PROCEDURE is a problem of calling not declaring?
Yeah, it's a bit faster. But this is all from the days of yore where half of your app was on disc all the time. Your processor won't notice. Look up KiloFox or the Hackers Guide for details.
The penalty for this is having myriads of files. I get paid for getting the program running in time rather then squeezing the last nanosecond. People are used to web interfaces those days - what ever you do on desktop is faster by several magnitudes. If you really have a speed issue somewhere it might be enough to have the procedures involved in single files.
Anyway I do not much on procedures - most is on classes except some special stuff.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform