On 1/9/07, Barton Willis <willisb at unk.edu> wrote:
> (%i3) if f(k) + 1 then 0 else %pi;
> Incorrect syntax: Found algebraic expression where logical expression
> expected
Well, this comes from the parser, which wants to see a "clause"
between if and then. It is easy to change that --
(DEF-RPOS $IF $ANY)
is enough. Then Maxima is happy with stuff like
'if f(k)+1 then foo else bar;
But as long as Maxima distinguishes Boolean values from arithmetic
values, I don't see how f(k) + 1 could ever become a Boolean.
So, although I am not usually in favor of error messages, it seems
appropriate in this context.
All the best
Robert