Matt --
This discussion has mentioned personal preferences and also speed as considerations. I'd like to add one more to the list.
I've always avoided calling by reference (except where explicitly needed), since poorly written routines can then (unintentionally and/or unknowingly) alter their calling environment.
Calling by reference is somewhat analagous to declaring a variable Private. Some called sub-routine might muck with it. I prefer to protect myself against that.
I realize of course that this can be handled by SET UDFPARMS (as to your original question about which syntax to use), so from that perspective, it's not that important. What
is important is recognizing that calling by value offers some protection not offered by calling by reference.
Cheers,
>I have several procedures in a .prg file that I call in various places in my form methods. And, I have "Set Procedure to WhatEver additive" in my app startup routine.
>
>So, when I want to use one of the procedures from a form or class method, I usually do something like this:
>
>
>Do SomeProcedure with lcSomeCharString1, lcSomeCharString, llSomeBoolValue
>
>
>I like the look of my code better if I do this:
>
>
>SomeProcedure(lcSomeCharString1, lcSomeCharString, llSomeBoolValue)
>
>
>It seems to work either way, so, are there any pros or cons to one way over another?
>
>.
Jim Nelson
Newbury Park, CA