Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Clear variables in a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112058] Clear variables in a list
  • From: Chris Degnen <degnen at cwgsy.net>
  • Date: Sat, 28 Aug 2010 07:01:45 -0400 (EDT)

Any suggestions how to clear variables in a list, eg:

a = 1; b = 2; c = 3; vars = {a, b, c};

None of these work:

Map[Clear, vars]
Map[Clear[Unevaluated[#]] &, vars]
Apply[Clear, vars, {1}]

Only this works: Clear[a, b, c]



  • Prev by Date: window frame
  • Next by Date: find selected function / F1
  • Previous by thread: window frame
  • Next by thread: Re: Clear variables in a list