Link to home
Start Free TrialLog in
Avatar of interclubs
interclubs

asked on

Streamlining Passing Values into Function...

I am trying to streamline the way I pass variables into a function.

I want to be able to do this:

SomeFunction("Name=John","Age=28","hair=brown");

So I am looking for a way to take the variables being passed into a function, and to convert them into their name value pairs. I want to do this in such a way that I can use it for all my functions and I don't have to hard code stuff. Is this possible? Bad Idea?

Avatar of Beverley Portlock
Beverley Portlock
Flag of United Kingdom of Great Britain and Northern Ireland image

It is not so much a bad idea as a pointless one.... at least I cannot see what you would put into the function in terms of code. To handle general data coming in you need a general function and it was proven back in th 1930s that no such general functionality is possible (Turing et al.)

I feel that I'm missing the point here. What are you actually trying to achieve?
ASKER CERTIFIED SOLUTION
Avatar of James Looney
James Looney
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial