Jeffrey,

Thursday, May 19, 2005, 8:23:40 AM, you wrote:

JB> On Thursday 19 May 2005 09:58, Mark Johnson wrote:
>>
>> So are functions a kept secret in MV programming or has no-one had any
>> issues with them? I'd like to know so I could either get better with them
>> or ignore them and continue with subs.

JB> Functionally speaking, why would I use a function which can return a single
JB> argument when I can use a subroutine which can return 1 or more?

2 reasons off the top of my head ..

1) allows boolean operation against so you could

if myfucn( .. ) then

I find this much cleaner than


mysub(...)
if ... then

2) the original constructs of subroutines and functions (not mv but in
the real programming world :) was that subroutines were passed data in
parameters .. but you couldn't change the parameters .. Functions
allowed for a routine to pass back information.

Now .. true .. like so many other things .. these are not rules in MV
.. but i use this structure (an ask our programmers to do the same) as
I feel it is much easier to *see* what has been changed.

IF i need to modify/passback multiple items either i put them in an
static or dynamic array .. depending.

Some people think it is more work than is necessary .. but that is
fine.

We are always thinking of maintenance and support ..
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to