Changing local variable dynamically

2004-04-08 Thread dumbest_dummie
Hi,

I'm testing 8 motor wich run in sequence for a certain amount of
time...
Each motor has a specific graph and information that should be
updated...
I'm using a for loop (n=8) and I'd like to use a generic local
variable (changing its reference according to 'n') to update the right
graph each iteration...
Right now I'm using a Case (with 8 possibilities). Should be easier...
Can this be done?

Thanks

Erick



Re: Changing local variable dynamically

2004-04-08 Thread Sebastian Dau

dumbest_dummie [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I'm testing 8 motor wich run in sequence for a certain amount of
 time...
 Each motor has a specific graph and information that should be
 updated...
 I'm using a for loop (n=8) and I'd like to use a generic local
 variable (changing its reference according to 'n') to update the right
 graph each iteration...
 Right now I'm using a Case (with 8 possibilities). Should be easier...
 Can this be done?

 Thanks

 Erick


Hy Eric,

If I understood you right, you are trying to edit 8 graphs in a loop and
with each loop step you'd like to modify a special one of your collection of
8.

To do  this I would get all eight references of the graphs and put it into
an array ordered just like you'd like update
the graphs.
this array can be passed to the loop with auto indexing
and so you'll get automatically get the right reference of the graoh to be
updated.