#466 variable needs to be quoted for DESCRIBE to work

closed
nobody
5
2004-10-09
2003-12-09
Robert Dodier
No

I'm running Maxima 5.9.0 cvs version of 20031128, with
Clisp 2.31, on linux kernel 2.4.2. I haven't tried this
on any other system.

I find that DESCRIBE(FOO) doesn't work as intended if
FOO is a variable -- it has to be DESCRIBE('FOO).
(If FOO is a function then DESCRIBE works as intended.)

I don't know what's the best solution -- (1) change
DESCRIBE so that it doesn't evaluate its argument? (Is
that possible? Desirable?) (2) Fix up the documentation
so that references to FOO say "Do DESCRIBE('FOO)" ?

There are many places in the texi documents which say
"Do DESCRIBE(FOO)" or "See FOO". Here is a partial list
of those:

Contexts.texi: CONTEXTS
Expressions.texi, Runtime.texi: FEATURES, features
Expressions.texi: PRODHACK
Expressions.texi: SUMHACK
Function.texi, xrefs.texi: MACROS
Input.texi: INFOLISTS, GRIND, %%
Integration.texi: ROMBERGABS, ROMBERGMIN
Matrices.texi: LMXCHAR, RMXCHAR, RATMX, LISTARITH,
DETOUT, DOALLMXOPS
DOMXEXPT, DOMXMXOPS, DOSCMXOPS, DOSCMXPLUS,
SCALARMATRIX, and SPARSE
near "Do DESCRIBE(option)"
Operators.texi: MODULUS
Runtime.texi: RATEXPAND
Trigonometric.texi: TRIGEXPAND, TRIGSIGN
Debugging.texi: SETCHECKBREAK, DEBUGMODE
Equations.texi: IEQNPRINT, SOLVE_INCONSISTENT_ERROR
Miscellaneous.texi: INF, MINF
Series.texi: TAYLOR_LOGEXPAND
Simplification.texi: MAXPOSEX, MAXNEGEX, CAUCHYSUM
Special.texi: GAMMALIM

Discussion

  • Logged In: YES
    user_id=588346

    Describe could certainly be made into an MSPEC (like an fexpr
    in Lisp). In general, I am against making things quote their
    arguments for convenience (because it mucks up
    programmatic use), but in this case I think it makes sense,
    since this really is a command-line, user-oriented command.
    Even after N years of using Maxima, I still commit the error of
    writing describe(gcd), for example. It seems very unlikely
    that anyone would want to have a variable argument to
    describe. Well, I suppose someone imaginative or misguided
    might try for i in [first,last] do describe(i), but given that
    describe is usually interactive (asking for the particular case
    to describe), this is not a great idea.

    So let's make it into an mspec.

     
  • Robert Dodier
    Robert Dodier
    2004-10-09

    • status: open --> closed
     
  • Robert Dodier
    Robert Dodier
    2004-10-09

    Logged In: YES
    user_id=501686

    I'm closing this bug report since the change suggested (to
    make DESCRIBE an MSPEC) was implemented in rev 1.13 of
    src/macdes.lisp.