Thank you Raul.  However it does not do what I expected.

I want a function which returns the incremental output in the execution window, and want to save those pieces separately.

The following script returns values of d, d0 and d1 all of which are identical. That presumably arises because the script execution is handled
by the interpreter prior to any output being passed to the session manager.

None of the sm_verbs I have tried actually return output. They place it in the session manager and they have an otherwise empty result.


NB. ==========================================
NB.  capturing script execution results
d  =: smread_jijs_ ''

test =: 0 : 0
a =: 2 3
b =: 1 4
a+b
a*b
a+/b
)

0!:1 test    NB.  I want to capture the displayed result

d0 =: smread_jijs_ ''

test1 =: 0 : 0
a%/b
)

0!:1 test1

d1 =: smread_jijs_ ''


Fraser
----- Original Message ----- From: "Raul Miller" <[EMAIL PROTECTED]>
To: "Programming forum" <[email protected]>
Sent: Sunday, November 30, 2008 7:46 AM
Subject: Re: [Jprogramming] capturing script execution


On Sat, Nov 29, 2008 at 1:28 PM, Fraser Jackson
<[EMAIL PROTECTED]> wrote:
I want to capture the lines written to the .ijx window
...
What is the simplest way to capture them?

  capture=:  smread_jijs_''

If you want to be more selective, you might
want to use smsetselect or something like that.

--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to