MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: enumerating list items


a={id,gender,status,odag}
b=Range@Length@a
MapThread[Set,{a,b}]
{id,odag,gender,status}

On Apr 12, 2005 5:26 AM, Søren Merser <merser at image.dk> wrote:
> hi
> 
> is there a way to make each item in the list 'assignable', i.e. i want to
> enumerate the items like id=1, gender=2 etc.
> 
> a={"id", "gender", "status", "odag"}
> 
> b=Range@Length@a
> 
> a=b
> 
> regards soren
> 
> 


-- 
Chris Chiasson
Kettering University
Mechanical Engineering
Graduate Student
1 810 265 3161


  • Prev by Date: Re: enumerating list items
  • Next by Date: Output format
  • Previous by thread: enumerating list items
  • Next by thread: Re: enumerating list items