Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What exactly is a
Message
De
25/11/2004 15:30:46
 
 
À
25/11/2004 13:05:36
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Database:
Visual FoxPro
Divers
Thread ID:
00964046
Message ID:
00964773
Vues:
8
>>>Hi Albert
>>>
>>>I strongly believe such a functions should be their own .PRG. If naming it is hard, imagine the added difficulty of trying to remember both the name and in what library to find it! Not only that, but you never even need a set procedure to to use it. That seems to me to make it even easier to use!
>>>
>>>It certainly should be a name that is explicit for the return value. You call the function for it to return something. You can comment the header of the function with keywords so you can find it again later, whatever you call it.
>>
>>Why not create a procedure file for all functions that manipulate a parameter? It could contain functions like asc2hex(), str2num(), whatever. If I do not immediately remember the name of a specific function, I probably do immediately remember that it will for sure be in that specific procedure file.
>>
>>Since we have the set proc ADDITIVE keyword there's no longer an excuse to put all stuff in only one procedure file. And performance is not the issue here.
>>
>>I agree with your notion that the usage of the returned value should be of influence on the name. Sometimes it's even handy to have a function that simply calls another function, just to create a sensible name.
>
>It's actually the name that I'm concerned about. If I put this function inside that procedure library, the name becomes (in a sense)
>
>procedurefile.function. It is harder to me to remember the procedure file name.
>
>In effect, I see the little .PRG as a pure extension of VFP. It is simply another function immediately available to the language without having to find it buried someplace. It is exactly like being able to use VFPs ALLTRIM function. How much purer can you get?

Most of my functions do a tough job and creating those functions took hours and sometimes even days. Those functions are best remembered. Especcially the little and simple ones, and the ones I got from others, are the ones I tend to forget.

Then there's another, related, problem that starts when maintaining an application built by some other person(s). The libraries (prg's, classes) in there are sometimes only documented within the libraries. Not so many developers spend time creating a helpfile or help-application about the used libraries. There has been at least one attempt to promote a methodology: documenting on top of the prg, using special markers like *-: and starting an application that produces a helpfile automatically. Anyone here who still uses that method?
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform