Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FUNCTION...ENDFUNC in a class.
Message
From
13/04/1998 10:14:14
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00090807
Message ID:
00091519
Views:
21
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform