SourceForge has been redesigned. Learn more.
Close

#2796 ode2 with n declared constant

None
closed
None
5
2016-09-12
2014-08-07
No
(%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")

Discussion

  • Jaime E. Villate

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,4 @@
    +~~~~
     (%i1) declare(n,constant)$
    
     (%i2) ode2('diff(f,x)=f,f,x);
    @@ -7,3 +8,4 @@
    
     (%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")
    +~~~~
    
     
  • bigfooted

    bigfooted - 2014-12-19

    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
  • David Billinghurst

    • assigned_to: David Billinghurst
     
  • David Billinghurst

    • status: open --> closed
     

Log in to post a comment.