Re: Automatic update of variables
- To: mathgroup at smc.vnet.net
- Subject: [mg110321] Re: Automatic update of variables
- From: Peter Pein <petsie at dordos.net>
- Date: Sun, 13 Jun 2010 04:10:57 -0400 (EDT)
- References: <email@example.com>
Am Sat, 12 Jun 2010 09:31:06 +0000 (UTC) schrieb Antonio De Ju=E1rez <adejuarez at gmail.com>: > Sometimes, I would find useful a method to update variables > automatically. For example, given the delayed rule > > b:=3 a+1; > > it would be useful to have b updated whenever a is assigned a new > value, like a=37. Is there any method to do this in Mathematica? > > Thanks, > > Antonio. > > Hi Antonio, I'm afraid I do not understand your problem: In:= b:=3 a+1; In:= b Out= 1+3 a In:= a:=123 In:= b Out= 370 As you see, b changes its value as a does.