Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Using a For[] command to assign names' topicStudent Support Forum > General > "Using a For[] command to assign names"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
yehuda ben-shimol
09/19/06 10:33pm

Hi,
It seems that you are adopting programming approach and concepts from c-like programming language.
As a first advice, do not use For loops. I never used them with Mathematica, and this is for many years
Now the real issue is whether you are interested with a list of strings or a list of variable names
for a list of string this is rather simple
Table["List"<>ToString[i],{i,10}]
generates a list
{"List1","List2",...,"List10"}
Not that the elements of the list will not serve as variables names
otherwise, if you are interested with list of names, just define them when you assign something to them. There is no need for declaration or definition of variables beforehand as in c, c++, Java and alike programs
good luck
yehuda

URL: ,

Subject (listing for 'Using a For[] command to assign names')
Author Date Posted
Using a For[] command to assign names Vassilis 09/19/06 09:55am
Re: Using a For[] command to assign names yehuda ben-s... 09/19/06 10:33pm
Re: Using a For[] command to assign names Vassilis 09/20/06 06:28am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic