Greetings to all, this is my first message!
I apologize if I make a silly question ...
I need to automatically assign a value to variables:
for (i in [1 to 10])
{
var (i) = value (i);
}
How can I do?
Automatically assign a value to a set of variables
Moderator: Martin
Re: Automatically assign a value to a set of variables
Do you need dynamically named variables? Like a1=1, a2=2, and so on?
for (i in [1 to 10])
{
eval('variableName'+"{i}"+'=i');
}
for (i in [1 to 10])
{
eval('variableName'+"{i}"+'=i');
}
Re: Automatically assign a value to a set of variables
Perfect, it was just what I wanted! Thank you.
I use automagic long enough but only for very simple tasks. Only recently I started to try the more advanced features.
I hope that you all want to help me to use more professionally Automagic.
Its author is a genius.
I use automagic long enough but only for very simple tasks. Only recently I started to try the more advanced features.
I hope that you all want to help me to use more professionally Automagic.
Its author is a genius.