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;
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.