On 10/5/10, Dan <vi5u0-maxima at yahoo.co.uk> wrote:
> On Tue, 28 Sep 2010, Robert Dodier wrote:
>
>> If you want to put the function definitions in a batch script,
>> you'll want to write this stuff as define(foo(x), <body of foo goes here>)
>> instead of foo(x) := ''(<body of foo goes here>).
>> define evaluates the function body, while quote-quote has a subtly
>> different effect; quote-quote won't work as expected in a batch script.
>
> Is this subtlety documented anywhere? The Maxima manual says
>
> `quote-quote causes evaluation when evaluation is otherwise suppressed'
well, the subtle part is that quote-quote is applied just once, when
an expression is processed by the parser. Maybe that has the
right effect, maybe not. Do you want the evaluate to happen
every time the function is called? If so, quote-quote has the
wrong effect.
Looking at the documentation, I think the description is accurate enough:
The quote-quote operator is applied by the input parser; it is not
stored as part of a parsed input expression. The quote-quote
operator is always applied as soon as it is parsed, and cannot be
quoted.
> and
>
> `Quote-quote is recognized by `batch''.
Right, and it has just the same one-time effect as in interactive input.
HTH
Robert Dodier