From: SourceForge.net <no...@so...> - 2011-01-07 13:19:07
|
Bugs item #3152753, was opened at 2011-01-06 22:30 Message generated for change (Comment added) made by willisbl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3152753&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core Group: None Status: Open Resolution: None Priority: 9 Private: No Submitted By: Van (lvwarren) Assigned to: Nobody/Anonymous (nobody) Summary: function definition doesn't update Initial Comment: In two consecutive cells enter: h[i,j]:= i+j; then genmatrix(h,2,2); Evaluate both cells. Then make any change to h[i,j] and reevaluate. The new definition is not used. See attached. Maxima version: 5.22.1 Maxima build date: 11:48 8/13/2010 Host type: i686-pc-mingw32 Lisp implementation type: GNU Common Lisp (GCL) Lisp implementation version: GCL 2.6.8 ---------------------------------------------------------------------- >Comment By: Barton Willis (willisbl) Date: 2011-01-07 07:19 Message: This isn't a bug. The statement h[i,j]:= i+j defines a memoizing function. To redefine a memoizing function, first use remarray; example: (%i1) a[i] := 5; (%o1) a[i]:=5 (%i2) a[7]; (%o2) 5 (%i3) a[i] := 8; (%o3) a[i]:=8 (%i4) a[7]; (%o4) 5 (%i5) a[42]; (%o5) 8 (%i6) remarray(a); (%o6) [a] (%i7) a[i] := 8; (%o7) a[i]:=8 (%i8) a[7]; (%o8) 8 I'd guess that the user documentation isn't all that clear about this. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3152753&group_id=4933 |