Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.programming    |    Programming issues that transcend langua    |    57,431 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 55,598 of 57,431    |
|    Paul N to All    |
|    How a spreadsheet works    |
|    11 Feb 22 08:09:55    |
      From: gw7rib@aol.com              I was thinking about how a spreadsheet knows which cells to update and what       order to do them in when the value in a cell changes. I've though of a       possible method - would this work and is it how things are normally done? I've       assumed that there are no        circular references, for completeness I would need to check for this.              I'll say that if a cell B depends on the value of a cell A, then B is a       "child" of A and A a "parent" of B. Each cell keeps track of its parents, its       children and also has a flag to say whether it needs to be updated.              When a cell is altered, you first look at what its parents now are, make a       note of this and also inform the old and new parents so they can update their       list of children. Then do the following, starting with the updated cell:              If the cell is already marked as needing updating, do nothing;       otherwise, mark the cell as needing updating and apply the same procedure to       its children.              Then do the following, again starting with the updated cell:              If one of more of the parents requires updating, do nothing;       otherwise, update the value, clear the flag, and apply the same procedure to       its children.              The idea is that no cell is updated too early, but each cell which is "passed       over" will eventually be done, after its last parent gets done.              So will this work, and is it normal?              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca