To split hairs, Raul: no -- I wasn't asking for help but -- yes -- I
needed it. So... thanks.

I may have to cut corners in JinaDay, but AFAIC I'd like to make
correct statements :-)

Ian


On Tue, Oct 26, 2010 at 4:42 PM, Raul Miller <[email protected]> wrote:
> On Tue, Oct 26, 2010 at 11:31 AM, Ian Clark <[email protected]> wrote:
>> I'd got to here, and was puzzling about sample 3 vs sample 2, when
>> your reminder arrived of how J parses "trains" (have I got the right
>> term?) -- in order to implement hooks and forks I guess.
> ...
>
> I do not know if you were asking for help, or if you wanted help,
> but if I understand the issue you were expressing here:
>
> sample 2?
>>   a=: 5
>>   a ; a ; (3 :'a=: 10')0       NB. J needs to read last 4 tokens at once
>> +--+-+--+
>> |10|5|10|
>> +--+-+--+
>
> sample 3?
>>   a=: 5
>>   a ; a ; (a=:10)              NB. but here it doesn't
>> +--+--+--+
>> |10|10|10|
>> +--+--+--+
>
> ... the following are all distinct "tokens":
> a
> ;
> (
> 3
> :
> 'a=: 10'
> )
> 0
> =:
> 10
>
> That said, note also that the contents of a parenthesis
> are evaluated before J inspects any tokens left of the
> left parenthesis.
>
> Consider also:
>
>   a;a;3 :'a=: 10'a=:5
>   a;a;(3 :'a=: 10'0)[a=:5
>   a;a;(3 :'a=: 10'a=:5)
> --
> Raul
> ----------------------------------------------------------------------
> 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