Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Multiline execution in Playground vs Example

25 views
Skip to first unread message

Hans Nikolaus Beck

unread,
May 11, 2024, 4:54:45 PM5/11/24
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 PM5/14/24
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 AM5/15/24
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