Nothing changed that would make f x
fail. The problem is that x is undefined and is therefore treated as a verb, so you have just defined the hook (f x). f has not been executed. It can't have x as an argument, because only nouns can be arguments to verbs. You could define x =. 'x' and then write f x. As for displaying the operands to verbs, look in the archives. Somebody, I think Oleg maybe, has some good utilities for that. Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Yuvaraj Athur Raghuvir > Sent: Thursday, October 05, 2006 9:31 PM > To: Programming forum > Subject: Re: [Jprogramming] Stumped on verbs that print... > > Thanks! > > But why does the original version not work? Since it was mentioned in > a paper, I expected that syntax to be working. Has there been a change > in J601? > > In general, if I want to print the arguments sent to a verb, > what should I do? > > Meanwhile, I shall check the fndisplay.ijs.... > > On 10/5/06, Henry Rich <[EMAIL PROTECTED]> wrote: > > Use > > > > f 'x' > > > > . For a similar tool, see ...\system\packages\misc\fndisplay.ijs . > > > > Henry Rich > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On Behalf Of > > > Yuvaraj Athur Raghuvir > > > Sent: Thursday, October 05, 2006 2:45 AM > > > To: Programming forum > > > Subject: [Jprogramming] Stumped on verbs that print... > > > > > > In the article [1] John Howland introduces math_pat as > > > math_pat =: 3 : 0 > > > '''',y.,'('',y.,'')''',LF,':',LF,'''',y.,'('',x.,'','',y.,'')''' > > > ) > > > > > > Changing this to J6 syntax, I have > > > math_pat =: 3 : 0 > > > '''',y,'('',y,'')''',LF,':',LF,'''',y,'('',x,'','',y,'')''' > > > ) > > > math_pat 'f' > > > 'f(',y,')' > > > : > > > 'f(',x,',',y,')' > > > With this I defined > > > f =: (3 : (math_pat 'f')) :. (3 : (math_pat 'f_inv')) > > > I expected that > > > f x > > > f(x) > > > Instead, after enabling all possible display formats I get > > > f x > > > f x > > > --T-â > > > âfâxâ > > > L-+-- > > > -- f > > > -+- x > > > f x > > > > > > How can I get the desired parenthetic format? I want to > study the J > > > function composition rules using this technique. > > > > > > ~Yuva > > > > > > [1] http://www.cs.trinity.edu/~jhowland/math-talk/functional/ > > > > > > > > ---------------------------------------------------------------------- > > For information about J forums see > http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
