Multiline execution in Playground vs Example

22 views
Skip to first unread message

Hans Nikolaus Beck

unread,
May 11, 2024, 4:54:45 PMMay 11
to forum
Hi, 
Now I'm loading a script file from the server and put it into jdo1(loadedText). It seems that multiline text induce an error, where the Playground has an Edit window and all the possibilities of an Desktop J. So what is the difference, what do I'm missing?

Cheers

Hans

Joshua Y

unread,
May 14, 2024, 8:46:46 PMMay 14
to forum, Hans Nikolaus Beck
You can assign your multi-line input to a noun in J with `jsetstr`, and then execute it with the `(0!:101)` foreign
eg.
jsetstr('code_priv_', source.value);
jdo1("(0!:101) code_priv_");

Hans Nikolaus Beck

unread,
May 15, 2024, 10:39:09 AMMay 15
to forum, Joshua Y, Hans Nikolaus Beck
Thanks!

And I need also something like var jsetstr = Module.cwrap('em_jsetstr', 'string',['string'])
Is there anywhere a documentation what is all inside 'Module'?

BTW, Webassembly for J would be a great thing, I hope support and docs are growing in future :)

Best

Hans
Reply all
Reply to author
Forward
0 new messages