[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Spreadsheet bug?
From: |
Stephan Schmitt |
Subject: |
Re: [Orgmode] Spreadsheet bug? |
Date: |
Fri, 24 Jul 2009 11:20:58 +0200 |
User-agent: |
Thunderbird 2.0.0.22 (X11/20090626) |
Andreas Burtzlaff wrote:
> On Thu, 23 Jul 2009 02:29:30 +0200 meingbg <address@hidden> wrote:
>> > | a | b | c |
>> > |---+----+---|
>> > | a | 2 | 2 |
>> > | b | 3 | 7 |
>> > | c | -3 | 4 |
>> > | d | 5 | 9 |
>> > #+TBLFM: address@hidden::@2$3=$2
>
> If @2$3 is manually set to 2 in the table, then the formulas produce
> the expected outcome. So, the problem seems to be the order of
> execution. If column c is cleared and the formulas are executed, @2$3
> is read to be 0 for the summation and is set to 2 only afterwards.
> Swapping the order in the TBLFM line doesn't help.
>
> Is the order something like field formulas after column formulas?
> Any chance to influence that?
Evaluating the field formulas before the column formulas is in general a bad
idea. Results of the field formulas will always be overwritten by the column
formulas (if there is a conflict).
Here you need to evaluate the spreadsheet twice to yield the intended result (I
get a 5 in field @2$3). From info:org:Updating the table:
> `C-u C-u C-c *'
> `C-u C-u C-c C-c'
> Iterate the table by recomputing it until no further changes occur.
> This may be necessary if some computed fields use the value of
> other fields that are computed later in the calculation sequence.
hth,
Stephan