I want to write a simple function that on being passed a variable name, then it can print that name and its value. I've got into a tangle with byref and byval, and I am not sure if the answer is that simple. for example, the sort of thing I'm looking for
function displayit( aval as string) as string
will print something like - 'string anystring = "content of string" '
if the function is called by displayit(anystring) where anystring = "content of string"
I've got myself into a head-achy situation with this. Then of course I will want to be able to produce a similar result for any type of variable. Any one care to post some code? I expect the solution is obvious, once I see it. (I don't want to use anything like 'displayit("anystring",anystring)' )
Thanks
Hi Raymw,
For clarification, can you post your current code?
Clive
OK, I'll have to find something to explain it better. My current code does not work, and most likely is going entirely in the wrong direction.
> I don't want to use anything like 'displayit("anystring",anystring)'
Then forget about it, because it would be the only way.
Thanks, Jose. I was sort of coming to the same conclusion, but can always live in hope...