On Sun, Nov 30, 2008 at 2:24 AM, Fraser Jackson
<[EMAIL PROTECTED]> wrote:
> Does this mean the script is interpreted and completed before the session
> manager is interrogated by the smread ?

After, not before.

>>> There must be a simple way of doing this.
>
>> I would explicitly capture the results I wanted
>> to capture.
>
> Exactly.  But what is a simple way of doing it?

 s1 =: smread_jijs_ ''
 capture +/~i.2
 s2 =: smread_jijs_ ''
  capture <];._2 s2 (}.~#) s1

You define the word capture to do what you want.

For example:

capture=:3 :0
   if._1-:nc <'safeplace' do.safeplace=:'' end.
   safeplace=:safeplace,<y
   smoutput y
)

Of course this captures the actual value, and not its linear
representation.  If you wanted that linear representation,
you could use

capture2=:3 :0
   if._1-:nc <'safeplace' do.safeplace=:'' end.
   safeplace=:safeplace,<5!:5<'y'
   smoutput y
)

FYI,

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

Reply via email to