Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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 smc.vnet.net
  • Subject: [mg56004] Re: enumerating list items
  • From: Peter Pein <petsie at arcor.de>
  • Date: Wed, 13 Apr 2005 01:10:41 -0400 (EDT)
  • References: <d3g96u$t4i$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

S=F8ren Merser 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
>
>
Evaluate[ToExpression[a]] = b

--
Peter Pein
Berlin


  • Prev by Date: Re: Re: Re: Re: ! operator
  • Next by Date: Re: precisions
  • Previous by thread: Re: enumerating list items
  • Next by thread: Re: enumerating list items