How to achieve this simple Column addition in JSL?
Feb 11, 2009 7:38 AM(1358 views)
Just a newbie of JSL.
I open a data tabel (each column is numeric type). And want to add up each other column to a new column "sum". Given the following script, I always get the Log Comment: invalid argument in access or evaluation of 'Column' , Column( dt, j ) Can anyone help me out? Thanks, Fred
Re: How to achieve this simple Column addition in JSL?
Feb 12, 2009 12:52 PM(1291 views)
It looks like [ i ] triggers italics mode among other formatting oddities I don't yet understand in the forum software.
Possible issues: The sumcol and column(dt, j) need to be subscripted (presumably that was lost in the formatting). Each sumcol row needs to be initialized to 0 before adding things to it. It looks like i and j are mixed up, and the column iterator should stop before the last column because you don't want to add sumcol to itself.
In general, you can debug these sorts of issues by executing your script one line at a time and checking results.