[Jprogramming] capturing script execution

Raul Miller rauldmiller at gmail.com
Sun Nov 30 15:47:53 HKT 2008


On Sun, Nov 30, 2008 at 2:44 AM, Raul Miller <rauldmiller at gmail.com> wrote:
> 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
> )

And, of course, this does not capture the source part
of the session.  For that, you would have to get more
involved -- use smread'' to grab the entire session,
then break it up on instances of lines begining with
the word capture, then merge that sequence of
session fragments with the results being captured.

Also, you would have to initialize the session and
the capture mechanism as a part of loading your
script (just before loading your script -- my lazy
initialization of the capture variable would not work).

-- 
Raul


More information about the Programming mailing list