The follwoing is clipped from a session: It illustrates that ^:(n) and
^:(,n)
appear to have a different effect. (n beta Windows XP)
INFO_base_ =: 0 2 $ 0
j =: scstep2 ^: 1 g0
INFO_base_
_1034.96 880
NB. An item is added to global INFO_base_ with each call
INFO_base_ =: 0 2 $ 0
j =: scstep2 ^: (,1) g0
INFO_base_
_1034.96 880
_1034.96 880
INFO_base_ =: 0 2 $ 0
j =: scstep2 ^: 2 g0
INFO_base_
_1034.96 880
2030.12 880
INFO_base_ =: 0 2 $ 0
j =: scstep2 ^: (,2) g0
INFO_base_
_1034.96 880
_1034.96 880
2030.12 880
Duplication of the first item appears systematically for vector arguments of
the power conjunction with the functions being used.
The follwoing minimal example which reproduces what I would expect to be the
code elements important in this case does not reproduce the behaviour.
NB. test exercise
t1 =: 4 : 0
INFO_base_ =: 0 2$0
sel^: (>:i.x) y.
)
sel =: 3 : 0
v =. (>:{.y.), 1.1*{:y.
INFO_base_ =: INFO_base_ , v
v
)
INFO_base_ =: 0 2 $ 0
g0 =: 1 1.1
sel ^:(1) g0
2 1.21
INFO_base_
2 1.21
INFO_base_ =: 0 2 $ 0
sel ^:(,1) g0
2 1.21
INFO_base_
2 1.21
Any suggestions would be helpful.
Fraser
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm