MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Re: Finding errors in my code?

  • To: mathgroup at
  • Subject: [mg48218] RE: [mg48060] Re: [mg48057] Finding errors in my code?
  • From: "David Park" <djmp at>
  • Date: Tue, 18 May 2004 04:16:44 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

We might hope for something better, but I always find that the quickest way
to debug is to add a Print statement to the code at a judicious point giving
the values of various state variables. I find this much easier than using
Trace. The warning and error messages are only a rough guide anyway and
don't necessarily tell you where the error originates.

David Park
djmp at

From: Hermann Schmitt [mailto:schmitther at]
To: mathgroup at

I aggree with Mr. Greenberg, Mathematica writes the error messages to the
end of the program code and gives no reference to the location of the error
in the program.
That may make the task of the programmers much more difficult than
Another solution could be, that Mathematica writes the error message
directly behind the command, that causes the error. I think, this could be
accomplished very easily.
Hermann Schmitt
----- Original Message -----
From: "Jonathan Greenberg" <greenberg at>
To: mathgroup at
Subject: [mg48218] [mg48060] [mg48057] Finding errors in my code?

> I often get errors which, while I might know what they mean (e.g.:
> CompiledFunction::cflist: Non-tensor object generated; proceeding with
> \
> uncompiled evaluation. ), I have no idea what call resulted in that
> particular error -- is there a way to get Mathematica 5 more descriptive
> error outputs (e.g. Having it recite back which line of code, or which
> command caused the error in question)?
> --j
> --
> Jonathan Greenberg
> Graduate Group in Ecology, U.C. Davis
> AIM: jgrn307 or jgrn3007
> MSN: jgrn307 at or jgrn3007 at

  • Prev by Date: RE: Selecting by first element of each list
  • Next by Date: Re: Re: Finding errors in my code?
  • Previous by thread: Re: Re: Finding errors in my code?
  • Next by thread: Re: RE: Re: Finding errors in my code?