Spreadsheets like MS Excel use rather complicated calculation engines to determine which cells are affected (effected?) by a change to a given cell. These engines are optimized for speed. I don't think they work in the manner you are suggesting (actually I wish I knew how the worked, there is some cool logic behind all that) but their debug engine (the recalc engine they use while debugging Excel) recalcs every cell on every delta, which is painfully slow. I think there is a data type that allows you to alter the values later... Its called a subroutine. =) Seriously. The way to do it is to define a subroutine with a void prototype and define it in terms variables. I think I saw a few posts earlier on that subject, but I'll reiterate: sub x() { $y + $z }
local $y = 10;
local $z = 12;
print x;
|