>Thanks for all of your help Al, I already can test another parameter to determine if the parameter in question was passed by reference, I was just curious as to if there was a way to programmatically test the parameter to tell rather than rely on the test result of the other parameter. I guess not.
I don't know of one. I've never had need for that.
A couple of other points:
- if you find a single routine needs to handle values passed by either reference or value, there are a couple of possibilities:
a) You're purposely writing generic code and you know exactly what you're doing and it's as designed
b) The routine started out handling only value or reference and you're extending it to handle both.
If the latter, you should explicitly create a parameter that does nothing except indicate whether the parameter in question was passed by reference. Otherwise, someone else may later pass the other parameter you're currently testing in an unexpected manner that should otherwise work, and you'll have a non-trivial bug to find and fix. IOW you should avoid "overloading" the parameter you're currently testing.
My personal style is to avoid passing by reference; I greatly prefer pure LOCAL parameters and variables. I also tend to avoid arrays so I seldom have to try to pass them; in those cases I'll pass a single parameter object by reference, instead. Parameter objects are handy things if you're not already familiar with them.
How do I return multiple values from a form? FAQ #7810
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up