Good luck.

And, not also that  (z);t 4 should not behave any different from z;t 4

Take care,

-- 
Raul

On Sat, Oct 16, 2021 at 10:48 AM Richard Donovan <rsdono...@hotmail.com> wrote:
>
> Thanks for a quick reply Raul. I have printed off the parsing rules for later 
> study and I use your workaround!
>
> Richard
>
> > On 16 Oct 2021, at 15:30, Raul Miller <rauldmil...@gmail.com> wrote:
> >
> > What you are seeing here is that J needs to understand what names mean
> > before it can act on those names.
> >
> > A concise summary of the issues is visible here:
> > https://www.jsoftware.com/help/dictionary/dicte.htm
> >
> > In 'z; t 4' the evaluation of t 4 corresponds to the second line of
> > the parsing table which you see at the bottom of that page.
> >
> > EDGE+AVN VERB VERB NOUN 1 Monad
> >
> > Here,
> > EDGE+AVN  corresponds to z
> > VERB (the left one) corresponds to ;
> > VERB (the right one) corresponds to t
> > and NOUN corresponds to 4
> >
> > In other words, J's parsing rules mean that it needs to figure out
> > what z is before it can evaluate t 4.
> >
> > Alternatives you might try:
> >
> >   z; (t 4)
> >   z;] t 4
> >   (z);t 4
> >
> > I hope this makes sense,
> >
> > --
> > Raul
> >
> >> On Sat, Oct 16, 2021 at 10:14 AM Richard Donovan <rsdono...@hotmail.com> 
> >> wrote:
> >>
> >> Hi. I write a function t, execute it, then execute it again.
> >>
> >>
> >> On the second execution, I want to display the intermediate result then 
> >> the final result
> >>
> >>
> >> I have coded it as below
> >>
> >>
> >> The intermediate result is displayed as the intermediate result of the 
> >> FIRST execution
> >>
> >>
> >> I was surprised as I thought J operates from right to left
> >>
> >>
> >> Thanks
> >>
> >>
> >>
> >>
> >>
> >>   t=: 13 : 'z=:2*y'
> >>
> >>   t 2
> >>
> >> 4
> >>
> >>   z; t 4
> >>
> >> +-+-+
> >>
> >> |4|8|
> >>
> >> +-+-+
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> 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