emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calc: `*' binds more strongly than `/'


From: Jay Belanger
Subject: Re: Calc: `*' binds more strongly than `/'
Date: Wed, 25 Apr 2007 23:06:48 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.98 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> The reason for Calc's current behavior is because Dave Gillespie,
>> Calc's author, thought of "a b / c d" as representing
>>  a b
>>  ---
>>  c d

This is what Dave said when I asked him about it.  (He actually said
he thought of the first version as an alternate way of writing the
second.)

> I expect the reason is slightly different: it's that the same rule is used
> for "a * b / c * d" as for "a b / c d".

Exactly; the motivation was for the implicit multiplication, but he
didn't want to give implicit and explicit multiplication different
precedences.

> The "juxtaposition operator" is traditionally assumed to have the
> highest precedence, so it of course parses as "(a b)/(c d)".

I hadn't realized that before, but it does seem pretty standard (but
not quite universal -- I read that the TI-85 and TI-86 treat
juxtaposition differently).  How interesting.

Jay




reply via email to

[Prev in Thread] Current Thread [Next in Thread]