On Sat, 4 Aug 2012, Logan Kelly wrote: > Is it possible to access elements of a list. I need the variable > name-as a string-of the i_th element of a list. Something like > > string variable_name = varnam(ylist[i])
You can't directly index into a list but -- if the idiomatic form of a "foreach" loop on the list is not suitable for your job -- you can index into the matrix (vector) counterpart of the list: matrix ymat = ylist string variable_name = varname(ymat[i]) Allin Cottrell