On 6/22/07, Terrence Brannon <[EMAIL PROTECTED]> wrote:
Frame Calculation: per http://www.jsoftware.com/jwiki/Essays/A_Fine_Line
...
I was going to comment that you could use J to calculate cell
and frame sizes.
cell=:1 :0
(0>.(r*v<0)+v=.{.u b.0)<.r=.#$y
:
(0>.(r*v<0)+v=.}.u b.0)<.r=.x ,&([EMAIL PROTECTED]) y
)
frame=:1 :0
0>.(#$y)-u cell y
:
0>. (x,&([EMAIL PROTECTED])y)-x u cell y
)
These would give the number of cell dimensions or frame dimensions
for a specific operation.
Example use:
(i.2 3) ,cell 7
2 0
(i.2 3) ,frame 7
0 0
However, I noticed that there's a bug in b. which prevents the above
code from producing accurate results for verbs with negative ranks.
I have reported this bug at the wiki.
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm