Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Procedure or Function? Warning - lStupidQuestionFlag=.T.
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00360281
Message ID:
00360393
Views:
13
>>While VFP doesn't differentiate between the two, I'd say that when you're returning a value, call it a FUNCTION and if not call a PROCEDURE. This not only is consistent with other languages (where the two aren't interchangable), but, I believe, adds to the readability.
>
>George,
>
>I'll disagree with you here. I say use the same keyword all of the time, that way when you are searching for routine in a source file you simply search for PROCEDURE or FUNCTION and find them all no matter how you intended to use them.

Jim,

I don't think there's really a right or wrong here, just personal preference. For me, making this differentation tells me immediately whether or not a value is returned as well as how it should be called. Is this a big deal, no terribly, since my routines tend to be short and it's pretty easy to tell one way or another rather quickly. Of course, I tend to be pretty AR about my code, and since this isn't a practice I could employ in most other languages, I don't see a reason to employ it here. To me it's one of those things that I can do, but don't. Sometimes, I think people forget that just because they can do something, doesn't mean that they should.

FWIW, I can't ever recall searching for something based on whether or not it was a procedure or function. The name, of course, the type, no.
George

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

Click here to load this message in the networking platform