One of the best ways to see how J operates is

to create something simple and use out to tell you

what is happening. Like this:

ONE=:0

out=: 1!:2&2

one=: 3 : 0

out ' here comes one'

out y.

2

out'ONE is: ',": ONE=:>:ONE

)

one ''

two=: 3 : 0

out ' ....and here is two'

out y.

33

)

(empty two AFTER one AFTER one AFTER two AFTER one ) 1 2 3 4

here comes one

1 2 3 4

ONE is: 1

....and here is two

ONE is: 1

here comes one

33

ONE is: 2

here comes one

ONE is: 2

ONE is: 3

....and here is two

ONE is: 3

This way a seemingly coplicated statement breaks down into simple

easily understood operations.

Try then looking at it in J

f=: (empty two AFTER one AFTER one AFTER two AFTER one )

f

ff=: f f.

and now look at ff

ff

out ' here comes one'

out y.

2

out' ONE is: ',": ONE=:>:ONE

)

out ' ....and here is two'

out y.

33

)

out ' here comes one'

out y.

2

out' ONE is: ',": ONE=:>:ONE

)

out ' here comes one'

out y.

2

out' ONE is: ',": ONE=:>:ONE

)

out ' ....and here is two'

out y.

33

)

This is pretty much like looking at source code.

Try it at home and try to use box or tree display and

you will notice the difference.

Because you knew from the start how simple this was

then you can begin to look at what you before considered

VERY complicated J statements and begin to see similarities

with what you wrote here above and you know that this is

NOT really as complicated as you tought to begin with.

I bet this is clear as mud by now so I stop before I complicate

it even further. The compilation I was waiting for is also finished

so I have to stop playing with my J. It is very easy to work with

c++ you add a few lines to the project, start a compilation and then you wait

for an hour before you can see how it goes.

/Gosi