9 : is equivalent to {{ }} other than the quoting. The form of speech is
inferred by the contents of the string.
9 : 'x u y'
1 : (':'; 'x u y')
On Thursday, October 22, 2020, 09:47:12 a.m. EDT, Don Guinn
<[email protected]> wrote:
Where did the 9 come from? Looks like 9 : is a new type of explicit
definition. Will it be documented?
Also how are we to interpret the line number? Looks like the error was on
line 2.
xxx=:'outer'
test=:3 : 0
ret=.'middle'
xxx=.'inner' {{ret=.y;xxx }}xxx
ret
)
test ''
|domain error: test
| xxx=.'inner' (9 :'ret =. y ; xxx')xxx
|[-7]
NB. Added line feeds and it works properly.
xxx=:'outer'
test=:3 : 0
ret=.'middle'
xxx=.'inner'
{{
ret=.y;xxx
}} xxx
ret
)
test ''
middle
test
+-+-+-----------------------------+
|3|:| ret=.'middle' |
| | | xxx=.'inner' |
| | |({{ ret =. y ; xxx }} xxx|
| | | ret |
+-+-+-----------------------------+
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm