* Better ways to address fields in tables
@ 2010-11-24 14:37 Torsten Wagner
0 siblings, 0 replies; only message in thread
From: Torsten Wagner @ 2010-11-24 14:37 UTC (permalink / raw)
I was wondering whether it might be possible to address table fields, which float due to adding and deletion of rows, more easily and thought about two possible ways.
The way I know (are there more ways?)
| | A | B|
| | a | 1 |
| | b | 1 |
| | s | 2 |
|^| | f |
many many more rows....
To calculate the sum s of all rows between a and b even if there will be more or less any time later I, use
f = vsum(@I..@II-1)
Rather verbose for a simple sum.
Might it be possible to adress the target fields relativ to horizonal lines?
@II = vsum(@I..@II-1)
This would make it independend of the number of rows in the block and there would be no need to assign a name to the field.
On the other hand, I often use a description beside the actual field like the "s" in the above example and in reality it might be something like "sum of all foo". Now I have to assign a name for the variable (above simply "f") or e.g., sum_foo. I am ending up having two descriptions for the same field, a human readable and an arithmetical.
Marking the first one (the one contains "s") in a special way could indicate to use it as a variablename for another field.
| A | B|
| a | 1 |
| b | 1 |
| s\> | 2 |
Whereas \> indicates: Use this string as the variable name for the field to the right. Similar, there could be \< \^ \v to assign the string to the field to the left, above or below. This method would be redundant to the original method for fields above and below but less verbose. Kind of shortcut.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-24 14:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-24 14:37 Better ways to address fields in tables Torsten Wagner
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).