The lines of an explicit defn can be boxed.
http://www.jsoftware.com/help/dictionary/d310n.htm
Therefore, you should be able to do:
js.Do("function=: 3 : ('a=.y'; 'a+1')")
----- Original Message -----
From: Damien <[EMAIL PROTECTED]>
Date: Thursday, August 2, 2007 7:34
Subject: [Jprogramming] J functions with Excel
To: Programming forum <[email protected]>
> Hello everybody,
>
> These days, I am working a lot with J via excel.
> I can easily execute J commands thanks to excel, with for
> example : js.Do
> ("my_1_line_command").
> Now, I would like to use a cholesky decomposition of my excel data.
> However, I have not found any means to the following things : I
> can not send
> to J something like :
> function=: 3 : 0
> a=. y
> a + 1
> )
> ...because there are several lines.
>
> I tried : js.Do("function=: 3 : 0" & vbNewLine & "a=. y" &
> vbNewLine & "a+1"
> & vbNewLine & ")" )...unfortunately, it does not work, I get a
> spellingerror.
> I could maybe use something like : js.Do("function=: 3 : 'a+1 [
> a=.y'"), but
> it is not very convenient when the function is quite long.
> Any idea ?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm