Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Functions or procedures
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00809351
Message ID:
00809391
Views:
27
>I've been updating an olepublic class that is used in a web server environment. The current version is in VFP5 and is an .exe server. We are evaluating whether it would be faster and more efficient to upgrade the program to VFP8 and create the server as an in-process dll.
>
>Anyway, I've noticed that in the foxweb samples that they use procedures for the methods, and the program I am updating uses functions. Since the samples provided with VFP tend to point you to the "right" way of doing something, should I convert my functions into procedures?

Jeff,

Here's my opinion and my practice. It's based on my experience in other languages.

VFP is the only high-level language that I know of where both procedures and functions can return a value. You can't do this in VB for example.

My own approach might be termed as the "classic" method of naming these. If it returns a value, it's a function. If it doesn't, it's a procedure.

I feel that the advantage here is that I don't have to go to the bottom of the code to determine whether or not a value is being returned.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform