Hi Thomas, another suggestion to help you understand J phrases. Henry Rich now maintains the J engine, and awhile ago wrote a very handy verb ‘dissect’.
If you run J (presumably you are running in JQT ?) then you can install the ‘debug’ package in the Package Manager (see JQT menu), then do this: load ‘debug’ NB. Or if you only want <dissect> you can <load ‘debug/dissect’> dissect ‘3 (-.&i.~,]) 7' You will see a very nice graphic appear in a new window, that demonstrates the way in which this phrase is executed (akin to a parse tree, but more interactive and more useful as it shows execution). Experiment with simpler phrases first to see how the graphic is constructed, it can be very helpful. Regards Rob > On 30 Jun 2019, at 5:20 am, Thomas Bulka <thomas.bu...@posteo.de> wrote: > > Am 29.06.2019 20:45 schrieb Clifford Reiter: >> Do these experiments help? >> to =: -.&i.~,] >> 3 to 5 >> 3 4 5 >> 3 -.&i.~ 5 >> 3 4 >> 5 -.&i. 3 >> 3 4 >> (i.5)-.(i.3) >> 3 4 > > Hello Clifford, > > thank you very much for your quick reply! By working through your examples, I > got a better understanding, I think. Probably my description is > terminologically weak, but now I would describe my understanding of the > to-sentence like this: > > 1. The i~ is used to generate the vectors (i. y) and (i. x). > 2. The less-primitive is used to remove (i. x) from (i. y), giving a result > of x..y-1. > 3. Finally the ,] is applied to add the upper limit, provided as the > parameter y, to the result. > > Is this, what the to-sentence is supposed to do? > > Kind regards, > > Thomas > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm