Re: enumerating list items
- To: mathgroup at smc.vnet.net
- Subject: [mg56021] Re: enumerating list items
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Wed, 13 Apr 2005 01:11:09 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 4/12/05 at 5:26 AM, merser at image.dk (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"} >b=Range@Length@a >a=b Yes. 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