f(a,b) := with_stdout("c:/jnk.txt", a : errcatch(a/b), if a = [] then 'und else first(a));
----- Original Message -----
From: "Barton Willis" <willisb at unk.edu>
To: "Maxima Mailing List" <maxima at math.utexas.edu>
Sent: Thursday, July 09, 2009 12:25 PM
Subject: suppressing error messages
How can I suppress the error message (Division by zero in this case) in a
function
such as: (the function f is just a toy---I wasn't wanting to do anything
like this)
(%i7) f(a,b) := (a : errcatch(a/b), if a = [] then 'und else first(a));
(%o7) f(a,b):=(a:errcatch(a/b),if a=[] then 'und else first(a))
(%i8) f(0,0);
Division by 0
(%o8) und
I think I've asked about this before, but I can't find it or remember the
trick.
Barton
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima