That is somewhat strange. I am not exactly sure how you are running the
script because sometimes the J environment might run a script within an
explicit verb without one being necessarily aware of it and some scripts
(such as the Wicket Toolkit) can be affected.
Try the following:
open a new editing window in JQt and type,
u@:v
then Run/All Lines (Ctrl+Shift+E) and you should get an error,
u@:v
|value error: scriptd
| u@: v
| ...
because the system is (probably) running the script within an explicit verb.
Now try the following instead:
Ctrl+A followed by Ctrl+E (with focus on the editing window), you should
get no errors,
u@:v
u@:v
just as if you had typed the line on the execution window.
I had no problems running the following script, using Ctrl+A followed by
Ctrl+E (with focus on the editing window), on a fresh installation of J807
(beware of line-wrapping),
JVERSION
(0!:0)<'c:\Users\Margy\j64-807-user\J Wicked Toolkit.ijs'
test=. u@:(1 + u) Adv
%: test
(%: test)(^: _) 0
clear''
RunWT_z_=. ".@:('(0!:0)<''c:\Users\Margy\j64-807-user\J Wicked
Toolkit.ijs'''"_)
clear'' NB. I know, I know
RunWT''
test=. u@:(1 + u) Adv
%: test
(%: test)(^: _) 0
This is the session output,
JVERSION
Engine: j807/j64/windows
Beta-k: commercial/2018-09-05T17:19:28
Library: 8.07.17
Qt IDE: 1.7.8/5.9.6
Platform: Win 64
Installer: J807 install
InstallPath: c:/program files/j64-807
Contact: www.jsoftware.com
(0!:0)<'c:\Users\Margy\j64-807-user\J Wicked Toolkit.ijs'
test=. u@:(1 + u) Adv
%: test
%:@:(1 + %:)
┌──┬──┬────────┐
│%:│@:│┌─┬─┬──┐│
│ │ ││1│+│%:││
│ │ │└─┴─┴──┘│
└──┴──┴────────┘
(%: test)(^: _) 0
1.49022
clear''
RunWT_z_=. ".@:('(0!:0)<''c:\Users\Margy\j64-807-user\J Wicked
Toolkit.ijs'''"_)
clear'' NB. I know, I know
RunWT''
test=. u@:(1 + u) Adv
%: test
%:@:(1 + %:)
┌──┬──┬────────┐
│%:│@:│┌─┬─┬──┐│
│ │ ││1│+│%:││
│ │ │└─┴─┴──┘│
└──┴──┴────────┘
(%: test)(^: _) 0
1.49022
Moreover, I ran the script many times (using Ctrl+A followed by Ctrl+E
repeatedly) without any issues. You might consider modifying the script,
according to the path where your updated Wicked Script is, and try to run
it exactly as is described above.
I hope it helps
On Fri, Sep 21, 2018 at 4:38 AM, 'Mike Day' via Programming <
[email protected]> wrote:
> Thanks for that, Jose. I've downloaded the zip file referred to in your
> link. It must
> be somewhere in my J mail folder, but I couldn't see it! I suspect my
> old copy dates
> from 2015 or 16...
>
> I've amended the Ver definition as suggested.
>
> You advise against loading the script, suggesting as (0!:0)<[file] as one
> alternative.
>
> I did of course try loading it before I spotted the advice (!), resulting
> in this error:
> load 'c:/d/j807/user/j wicked toolkit.ijs'
>
> |value error: script
>
> | u(a3=.(o(train o aw f.))('av'f.))
>
> |[-93] c:\d\j807\user\j wicked toolkit.ijs
>
>
> Then I spotted your advice and tried this instead:
>
> runwt =: 3 : 0
>
> (0!:0)<'c:/d/j807/user/JWickedToolkit.ijs'
>
> )
>
> runwt 1
>
> ... with similar results:
>
>
> runwt 1
>
> |value error: runwt
>
> | u(a3=.(o(train o aw f.))('av'f.))
>
> |[-93] c:\d\j807\user\JWickedToolkit.ijs
>
>
> However,
>
> clear''
>
> followed by a bare
>
> (0!:0)<'c:/d/j807/user/JWickedToolkit.ijs'
>
> in the terminal window (under Jqt) apparently resulted successfully.
>
>
> Repeating the process seems to hang, although running jbreak in Windows
>
> is "successful" in returning the J session to input mode without crashing
> J.
>
> That's as far as I've got.
>
>
> So while Martin Kreuzer's original question was how to save an intermediate
>
> resulting value, your debate with David Lambert appears to centre on
>
> repeated invocations of a verb, such as mean, whose resulting value(s)
> would
>
> possibly be different at different stages of the process, or in
> "simultaneous" but
>
> different arcs...
>
>
> Thanks again,
>
> Mike
>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm