You can’t accomplish this in the way you’re approaching, due to the
very different in this way from Java/C/C++, using dynamic binding at
runtime. So you’ll need to find a different solution (e.g. use an
array for your ex variables, store values in a hashtable which is
dynamically resolved at runtime, manually type all the code rather
than using a for loop, or some other approach).
On 27 Mar 2006, at 21:17, Joshua Kit Clayton wrote:
> You can’t accomplish this in the way you’re approaching, due to the
> static nature of Java compilation.
Actually, it could probably be achieved using the reflection API, but
it would be untidy and not very efficient. From the fragment of the
example given, it’s not clear to me why it’s necessary to do the
coding this way.
thankx for the enlightment, at least now i now that it’s not possible. i allways find out a way to go around this but sometimes i just wish it could be possible.
the example i gave was not a real example, it was just to be simpler for you to help me, so it was easy to go around it…