Ian, et al,
As it turns out, I understand better now the purpose of this code which I
pasted (special) into this message after cleaning up the extra lines. At
first the code was confusing, especially because the verb is not assigned
to a name, but that should have been a signal, it turns out, of what you
were doing: attempting to show an actual executing explicit verb that
contains commenting smoutput's. Maybe this approach will prove to be a good
strategy for others in the future.
monad define ''
indexes =: (numCols data) "_
smoutput ' ',:'calculating indexes before and making into a constant verb
in gerund'
dataA =: _99 (newData`indexes`] }) data
smoutput 'SUCCESS: dataA =: _99 (newData`indexes`] }) data'
smoutput ' ',:'calling from directly - no gerund usage'
dataB =: (_99 newData data) (numCols data) } data
smoutput 'SUCCESS: dataB =: (_99 newData data) (numCols data) } data'
smoutput ' ',:'using a simplier index calculation in a gerund'
dataC =: _99 (newData`numColsX`] }) data
smoutput 'SUCCESS: dataC =: _99 (newData`numColsX`] }) data'
try.
smoutput ' ',:'using gerund with full index calculation'
dataD =. 99 (newData`numCols`] }) data
smoutput 'SUCCESS: dataD =: _99 (newData`numCols`] }) data'
catch.
errNo =. 13!:11 ''
errMsg =. 13!:12 ''
smoutput 'FAILURE: dataD =: _99 (newData`numCols`] }) data'
smoutput 'Error number was ', (": errNo), LF,errMsg
end.
)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm