View Single Post
Old 06-22-2004, 02:22 AM   #11 (permalink)
npa
Code Monkey
 
Join Date: Jul 2003
Location: canada
Posts: 82
npa is on a distinguished road
fwiw, the general system to solve the 'dynamic variable' problem
in non-scripting langauge is a hashmap.

it seems that your design could be better, (i.e. array list
to hold your obj's, instead of strange referencing rules),
but don't forget the hashmap can provide you a nice way to
reference objects attached to strings (i.e. the dynamic variable
illusion) ... so if it is a real requirement, and you intend
to use non-increasing numbers as your variable names, consider
the hashmap, it can be appropriate here.

of course, however, optimise your design first
__________________
direct entry file specification.
npa is offline   Reply With Quote