CNT =: 3 : 'y [ COUNTER =: >: COUNTER'
COUNTER [[ CNT@{. 1 2 3 [ COUNTER =: 0
1
In the general case, COUNTER might have instead been a conjunction,
which would have meant that the [ to the left of CNT in your
expression would have been an argument to that conjunction, instead of
being a simple verb which ignores the value from CNT.
I hope this helps,
--
Raul
On Tue, Jun 1, 2021 at 6:08 PM 'Pascal Jasmin' via General
<[email protected]> wrote:
>
> CNT =: 3 : 'y [ COUNTER =: >: COUNTER'
>
> COUNTER [ CNT@{. 1 2 3 [ COUNTER =: 0
>
> 0
>
> COUNTER
> 1
>
> workaround
>
> 3 :'COUNTER' [ CNT@{. 1 2 3 [ COUNTER =: 0
>
> 1
>
> J is being too smart in short circuiting constant [ ....at console (jqt)
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm