Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: enumerating list items

  • To: mathgroup at
  • Subject: [mg56021] Re: enumerating list items
  • From: Bill Rowe <readnewsciv at>
  • Date: Wed, 13 Apr 2005 01:11:09 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

On 4/12/05 at 5:26 AM, merser at (Søren Merser) wrote:

>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"}




a = {"id", "gender", "status", "odag"}; 
Evaluate[ToExpression /@ a] = Range@Length@a; 
{id, gender, status, odag}

{1, 2, 3, 4}
To reply via email subtract one hundred and four

  • Prev by Date: Mandrake 10.1 and Mathematica 5.0?
  • Next by Date: rasterarray border?
  • Previous by thread: Re: enumerating list items
  • Next by thread: Re: enumerating list items