(%i1) declare(n,constant)$ (%i2) ode2('diff(f,x)=f,f,x); define: in definition of integfactor, found bad argument n #0: ode2(?_l=['diff(f,x,1) = f,f,x])(ode2.mac line 100) -- an error. To debug this try: debugmode(true); (%i3) build_info(); (%o3) build_info(version="5.33.0",timestamp="2014-04-04 08:28:01",host="i686-pc-mingw32",lisp_name="GNU Common Lisp (GCL)",lisp_version="GCL 2.6.10")
this is due to a name clash between the user-declared 'n' and the 'n' in the function definition of integfactor at line 100:
integfactor(m,n):=...
The simplest solution is to rename internal variables in the function definition using e.g. _m,_n, etc to avoid name clashing, or to declare m,n local
Last edit: bigfooted 2014-12-22
Fixed with commit
commit 9a4694fd85a40e117b0220df78b3ce44001670b1
Author: David Billinghurst dbmaxima@gmail.com
Date: Mon Sep 12 15:42:12 2016 +1000
https://sourceforge.net/p/maxima/code/ci/9a4694fd85a40e117b0220df78b3ce44001670b1/
Open to better soultions.
I think this is a bug that is fixed by lexical symbols. Stay tuned.
Turns out this bug is also fixed by allowing user-declared constants to be formal arguments for functions (and only disallowing system constants such as inf, minf, %pi, etc). See commit 0517895 and bug #3403.
I'll revert 9a469 since the
local
declarations are no longer needed due to 05178.