Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FUNCTION...ENDFUNC in a class.
Message
De
13/04/1998 10:14:14
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00090807
Message ID:
00091519
Vues:
22
>>My thinking has been that isolated functions that don't refer to other globals, properties, etc. might as well go into a procedure library.
>>
>>Peter Robinson

>The main CW is that a custom object with custom PEMs is OO and a procedure library via SET PROC TO is not.
(Colin Magee)


Well, yes, it's not OO, but I'm still asking which is the best approach. Let me give you an example. Paul Vlad Tatavu has contributed the following function to the KB:

function WeekLastDay(tdDate)
return tdDate-Dow(tdDate)+7

Now, I would like to have this function handy to use. Should I create
some kind of date class to contain this and other methods or just
put in a procedure library? My inclination is to do the latter.

Or looking at it from a different point of view: VFP has gazillions of functions. Is this a problem that they are not methods?

Peter Robinson
Peter Robinson ** Rodes Design ** Virginia
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform