I think what you're after is
declare(a,constant);
It is implemented as a Maxima property, which are, in turn, implemented as a
list by the name mprops, attached to the object. In other words:
(%i1) to_lisp();
Type (to-maxima) to restart
MAXIMA> (get '$a 'mprops)
NIL
MAXIMA> (to-maxima)
Returning to Maxima
(%o1) true
(%i2) declare(a,constant);
(%o2) done
(%i3) to_lisp();
Type (to-maxima) to restart
MAXIMA> (get '$a 'mprops)
(NIL $CONSTANT T)
Viktor
-----Original Message-----
From: maxima-admin@math.utexas.edu [mailto:maxima-admin at math] On
Behalf Of Albert Reiner
Sent: Thursday, December 23, 2004 5:26 PM
To: Maxima mailing list
Subject: defining a constant
Hi,
how do I define a constant in Maxima? Is the proper way to use
DEFINE_VARIABLE with a mode of ANY_CHECK and a function that always
errors out?
The info manual entry
,----
| Info from file /usr/local/share/info/maxima.info:
| - special operator: CONSTANT
| - makes ai a constant as is %PI.
`----
made me believe that I might define some constant by calling CONSTANT
with some arguments, but this does not seem to be the case. Indeed, I
do not see where $CONSTANT is defined in the Lisp sources, and sure enough
,----
| (%i14) ?describe(constant);
|
| $CONSTANT is an internal symbol in the MAXIMA package.
| (%o14) FALSE
`----
it does not seem to be.
Thanks in advance for any clarifications,
Albert.
P.S.: Version: Maxima 5.9.1.
_______________________________________________
Maxima mailing list
Maxima@www.math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima