Warnings compiling



I had just supposed variables which were not global (from define variable) or function arguments were local. Maybe I should look into block. My lisp is very rusty. I mainly used xlisp some with an amiga many years ago.

Dennis J. Darland
dennis.darland at yahoo.com
http://dennisdarland.com/
http://dennisdarland.com/dennisdaze/
http://dennisdarland.com/philosophy/
http://sode.sourceforge.net/
"According to the World Health Organization, the warming of the planet caused an additional 140,000 deaths in 2004, as compared with the number of deaths there would have been had average global temperatures remained as they were during the period 1961 to 1990. This means that climate change is already causing, every week, as many deaths as occurred in the terrorist attacks on September 11, 2001"
-- Peter Singer _Practical Ethics, Third Edition_, p. 216.


--- On Fri, 8/10/12, Robert Dodier <robert.dodier at gmail.com> wrote:

> From: Robert Dodier <robert.dodier at gmail.com>
> Subject: Re: [Maxima] Warnings compiling
> To: maxima at math.utexas.edu
> Date: Friday, August 10, 2012, 12:16 AM
> On 2012-08-10, Dennis Darland <dennis.darland at yahoo.com>
> wrote:
> 
> > Compiling I get many warnings about undefined
> variables. As I
> > understand it 'define variable' defines global
> variables. Many of the
> > variables I got warnings for I would not want to be
> global. Is there
> > a way to define local variables?
> 
> Well, as far as I know, the Maxima to Lisp translator
> complains about
> variables which are neither function arguments nor local
> variables (as
> in block([a, b, c], ...)). If you are getting complaints
> about such
> variables, that seems like a bug. If you would provide
> examples it would
> be helpful.
> 
> > Others are arrays. The arrays worked as global OK when
> the code was
> > being interpreted. I could not figure how to define
> arrays in
> > define_variable either.
> 
> There is something about arrays in the mode_declare
> documentation, but I
> don't know to what extent the translator actually exploits
> that
> information.
> 
> > Also, the code ran even with the warnings, but was no
> faster.
> 
> Not too surprising.
> 
> The long and the short of it is that Maxima is something of
> a mess as a
> programming language. You will probably be less frustrated
> if you think
> of programming in Maxima as more of an empirical exercise
> than logical.
> 
> FWIW
> 
> Robert Dodier
> 
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>