Thanks for the plug, John. The question is really more of a hook/fork question than a verb-rank question. I can't find a good beginner's discussion on the Wiki. Chapter 37 of JfC starts this topic, which is also alluded to at the end of chapter 12.
Name substitution in J is not string substitution. It's much more subtle than that. To get started, pretend that every name is enclosed in parentheses when it is substituted, so odds=: 1: + 2: * i. odds 5 is like (1: + 2: * i.) 5 and then you can see that the real question is, What in the world does (1: + 2: * i.) - five verbs and no noun - mean? The answer is, It's a fork, but you have to get deeper into J before you can make sense of that 'explanation'. Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of John Randall > Sent: Friday, November 14, 2008 6:58 PM > To: Programming forum > Subject: Re: [Jprogramming] Newbie question on defined verbs > > List wrote: > > Can anybody point me toward an article or essay or something which > > explains in some detail how things work differently when verbs are > > executed within a defined verb verses how the individual > verbs would act > > in the main interpreter window? > > In my opinion, the most useful general introduction to J is > Henry Rich's > book "J for C Programmers", which is in your J installation > (accessible > via JfC in top or bottom menus in Help). In Chapter 6, Henry > discusses > verb rank, and gives a number of examples similar to yours. > > Please don't be put off by J's apparently bizarre behavior. It is > actually very regular and versatile, but requires some > getting used to. > > Best wishes, > > John > > > ---------------------------------------------------------------------- > For information about J forums see > http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
