Thanks again Brian,

I agree that the new-line issue is particularly frustrating.
Even with the clean-up a few line endings got mucked up.  I have tried to show 
the part of the script below as it should be. 
<quote>
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'
</quote>
Should be
<quote>
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'
</quote>

As it turns out the error was mine all the way. I was using a monadic tact verb 
in a dyadic context. The real problem existed between the screen and keyboard!

Ian
Ian Shannon
Strategic Science Branch
Office of Environment & Heritage
PO Box A290 Sydney South
NSW       1232
Phone: (02) 99 955 490
Mob:       0424 724 352

Please consider the environment before printing my email

A recent survey has found that 6 out of 7 people includes approximately 86% of 
the population


-----Original Message-----
From: General [mailto:[email protected]] On Behalf Of Brian 
Schott
Sent: Tuesday, December 06, 2016 1:59 AM
To: General forum <[email protected]>
Subject: Re: [Jgeneral] Possible bug in AMEND

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
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
This email is intended for the addressee(s) named and may contain confidential 
and/or privileged information. 
If you are not the intended recipient, please notify the sender and then delete 
it immediately.
Any views expressed in this email are those of the individual sender except 
where the sender expressly and with authority states them to be the views of 
the NSW Office of Environment and Heritage.

PLEASE CONSIDER THE ENVIRONMENT BEFORE PRINTING THIS EMAIL
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to