Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper technique for Functions/Procedures
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00095133
Message ID:
00095343
Vues:
21
>I used to define functions and procedures in my SCAFFOLD.PRG in the pre-VFP5 days. If I were to take oo programming seriously, what would be the proper way to deal with such things nowadays? What are the advantages and pitfalls?
>
>TIA

Michael,

One of the advantages of keeping the old procedure file, especially if it's well designed (which I'm sure it is) is that you can reduce the overall size of the application by having single reference points. The danger of adding common functions to each form (for example) is that it increases not only program size but load time as well. However, the procedure file should contain only functionality that most, if not all, forms or programs required (ie: a function to open a table).

One more note. Sometime ago, I created some code to measure which was executed faster, procedures and functions versus calling their object based counterparts. The straight DO myproc was faster than oObject.myproc, and similarly the functions were the same. The object creation and the procedures were in the same file.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform