Um. A few years back (around J4) ... Chris showed me a way to display
the order of execution for a J sentence by pressing CTRL+F1 (I think!).
I was looking for it because I'm writing an article on computing the
slope on a line (yep ... very simple) and I want to show in the article
the brute force way:

NB. Data to use

point1=: 1 5
point2=: _2 0

 

slope2points=: dyad define
NB. first points
'x1 y1'=. x
NB. 2nd points
'x2 y2'=. Y

NB. Change in Y divided by change in X
(y2 - y1) % (x2 - x1)
)

   point1 slope2points point2
1.66667

 

And the simple way:

   %~/point2-point1
1.66667

 

I just need the order of execution. Any help  is appreciated. 

 

r/Alex

 

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to