On Thu, Oct 10, 2019 at 03:45:54PM +0100, Ralph Corderoy wrote:
> Hi Ulrich,
> 
> > I have written a small perlscript, that preprocesses tables and allows
> > to 
> >
> >     - add the values in selected collums
> >     - to replace a table entry by the result of an expression
> 
> Thanks for letting us know.  As Mike said, please show us the code;
> the list's archive will hopefully capture it for others that Google later.
> 
Should I place the code under GPL, if so, which version?

> On the general topic, to be more spreadsheet like it would need to allow
> forward references too, e.g. y=x+z where x was earlier, and already known,
> but z is yet to be seen.  And also in-line evaluation, similar to eqn's
> `delim @@'.
> 
I tried to keep it as simple as possible, but useful for my needs, e.g.
        - keeping track of costs, payments and profit from a couple of rented 
flats
        - keeping track of repayments and interest payments for some capital 
loaned to some people
        - keping track of my monthly income and spending; the rented flats go 
into nested subtables
        - preparing the annual tax return

However, in-line evaluation could easily be added when I drop the syntactical 
requirement to
have E.<n> at the beginning of a table entry; probably one would then need some 
brackets
around E.<n> <expression.

A word of caution: 
I am NOT an experienced perl programmer. My backgrond is in C++ (and math).
I tried to keep the code so simple that even I will understand it after a year.

> 
> As with all these little languages, much of the insight comes from
> trying to apply it to one real task after another.  But the problem
> seems tractable.
> 
that's, what I did, see above.
Btw, the first version was written in awk, but I missed an evaluate-statement 
there.

Hopefully I will post tomorrow, when I know abou GPL.

Cheers,

  ulrich

Reply via email to