The API reference doesn't mention the ability to execute a script
since that is a property of the language, and not the api reference
itself.

So it winds up being (after you have got the session running) a jset
followed by a jdo.

A trick, though, is that you'll have to use language features (13!:)
to support debugging of the code within your application. So that'll
be something like jdo("13!:0]1"); to enable debugging, jdo("13!:1''");
to get a readable stack trace, and so on...

Good luck,

-- 
Raul

On Sat, Jul 4, 2015 at 9:57 PM, Jon Hough <[email protected]> wrote:
> Oh, we can execute an entire script? I did not know that. If this works it 
> could make things ... interesting.
> Incidentally, the API reference, which is surprisingly tricky to track down(I 
> found a version here:  
> http://www.jsoftware.com/pipermail/programming/2013-June/032979.html  )
> does not seem to mention this. I know there is a j.dll reference somewhere in 
> the wiki, but my searches come up with nothing. (I think j6 also has some 
> j.dll reference *.ijs scripts, perhaps I should install it).
> Anyway, thanks, I will give this a try.
>
>> From: [email protected]
>> Date: Sat, 4 Jul 2015 21:49:11 -0400
>> To: [email protected]
>> Subject: Re: [Jprogramming] Feeding multiline verb definitions into JDo
>>
>> It has been a while since I have attempted any such thing, but you can
>> also define variables which contain arbitrary text (such as a script),
>> and you can execute them using the 0!: family of foreigns.
>>
>>         JDo('0!:110 script');
>>
>> That said, note that your biggest issue, when you get to deploying the
>> software you develop, will be isolating errors experienced by your
>> users. Assuming you wrote decent code, these will typically externally
>> induced.
>>
>> So you might want an option to use 0!:111 or some such? It'll be worth
>> going through a few induced errors (permission denied on a file
>> reference, for example) *after* you have things working, but before
>> you release the code.
>>
>> Thanks,
>>
>> --
>> Raul
>>
>>
>> On Sat, Jul 4, 2015 at 9:42 PM, Jon Hough <[email protected]> wrote:
>> > It seems that when using the j.dll (libj.do) API from another language, 
>> > JDo allows the defining of verbs. But I have only managed to define single 
>> > line verbs so far. It seems adding LF or even '\n' into the command string 
>> > parameter of JDo does not work (in the sense that it will return an error 
>> > when using JGetM).
>> > Does anyone know if it is possible to do multiline definitions, and if so 
>> > how?
>> > Thanks,Jon
>> > ----------------------------------------------------------------------
>> > For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to