The wording as I have it in the book does not quite work as
a programming spec.  You calculate rcf as 0 (correct), but the
(-rcf)-cells are intended to be the cells whose frame is
empty, i. e. the operands in their entirety, NOT 0-cells.  My
wording says (-0)-cells which is worng - it shouldn't
turn into 0-cells.
I'll change the wording.

Meanwhile, you should go to the next example in the book, which
deals with the case where the common frame is empty, as it
is in your example.

Henry Rich

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Terrence Brannon
> Sent: Tuesday, April 17, 2007 2:55 PM
> To: General forum
> Subject: [Jgeneral] "J for C Programmers" - When dyad frames differ
> 
> I'm sorry to re-start this thread, but the discussion at
> http://www.jsoftware.com/help/jforc/loopless_code_i_verbs_have
> _r.htm#_Toc141157994
> 
> is leaving me in the a bit confused at a certain point, so 
> let's take the
> discussion there sentence by sentence.
> 
> The code I am trying to solve out is 2 4 { 3 1 4 1 5 9 NB. 
> sorry to all
> those who wrote in
> last thread, but I'm still at it
> 
> So here we go:
> 
> The formal description that follows is not easy to 
> follow--you might want to
> skim over it and read it in detail after you have studied the 
> examples that
> follow.
> 
> J requires that one of the frames be a prefix of the other 
> (if the frames
> are identical, each is a prefix of the other and all the 
> following reduces
> to the simple case we have studied).  The common frame cf is 
> the part of the
> frames that is identical, namely the shorter of the two 
> frames; its length
> is designated rcf.
> 
> So our first goal is to calcuate rcf
> left-noun-rank = 1, right noun rank = 1
> left verb rank = 0 , right verb rank = infinite
> left rank     = 0 , right rank = 1
> left shape = 2 right shape = 6
> lf (left frame) = 2, rf (right frame) = "" (empty)
> cf = ""
> rcf = 0
> 
> Ok, good we have rcf. Let's continue:
> 
> 
>  If we look at the cells of the operands relative to this 
> common frame (i.
> e. the (-rcf)-cells), we see that for the operand with the 
> shorter frame,
> these cells are exactly the rank that will be operated on, 
> while for the
> operand with the longer frame, each (-rcf)-cell contains 
> multiple operand
> cells.
> 
> rcf-cells are 0-cells in this case.
> The operand with the shorter frame is the right one. So we 
> should find that
> 0-cells are exactly the rank (0) that will be operated on. 
> But the right
> rank is 1, not 0. This doesnt seem right, but for now, I will 
> continue:
> 
> First, the (-rcf)-cells of the two operands are paired 
> one-to-one (because
> they have the same frame), leaving each shorter-frame operand 
> cell paired
> with a longer-frame (-rcf)-cell.
> 
> The 0-cells of the two operands are paired one-to-one? 2 is a 
> 0-cell. 4 is a
> 0-cell. Same with 3, 1, 4, 1, 5, and 9... resulting in 12 
> pairings... hmmm,
> something is rotten in Denmark...
> 
> Then, the longer-frame (-rcf)-cells are broken up into 
> operand cells, with
> each operand cell being paired with a copy of the 
> shorter-frame operand cell
> that was paired with the (-rcf)-cell
> 
> _operand_ cells? rcf is 0, how do you break longer frame 0-cells into
> operand cells? How do longer frame operand cells differ from 
> shorter-frame
> operand cells.
> 
> (an equivalent statement is that the cells of the 
> shorter-frame operand are
> replicated to match the surplus frame of the longer-frame operand).
> 
> Again, I think I have something switcheroo'ed. I think that 3 
> 1 4 1 5 9 (the
> right operand) has the shorter frame, but it looks like 
> somehow I have that
> wrong.
> 
> This completes the pairing of operand cells, and the operation is then
> performed on the paired operand cells, and collected using the longer
> frame.
> 
> yes, this is what fndisplay would show me... without any 
> intermediate steps
> to tutor me.
> ----------------------------------------------------------------------
> 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