tstr =: '* ,: +'
   (;:tstr)`:6
* ,: +
+-+--+-+
|*|,:|+|
+-+--+-+
   3 4 5 (;:tstr)`:6 (7 2 4)
21 8 20
10 6  9

Henry Rich 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Sherlock, Ric
> Sent: Tuesday, November 25, 2008 10:52 PM
> To: Programming forum
> Subject: [Jprogramming] Define tacit verb from string
> 
> For some tacit sentence eg:
>    (* ,: +)
>    3 4 5 (* ,: +) 7 2 4
> 21 8 20
> 10 6  9
> 
> Defined as a literal string eg:
>    tstr=: '(* ,: +)'
> 
> How can I create a named (preferably tacit) verb?
> The only thing I've been able to come up with is:
> 
>    texp=: 4 : 0
>    ". 'x ',tstr,' y'
> )
>    3 4 5 texp 7 2 4
> 21 8 20
> 10 6  9
> 
> I have an uncomfortable feeling that there is simple and 
> elegant solution but my mind is numb!!
> ----------------------------------------------------------------------
> 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