On Fri, Jun 18, 2010 at 5:12 PM, Zsbán Ambrus <[email protected]> wrote:
> then U has the value of an adverb train (stc ev1), which is an adverb itself,
> so
> the grammar calls it with h as the argument, and this h U call
> evaluates to (h stc) eg1. Now (h stc) is an adverb, so you get a
> syntax error because the adverb eg1 can't be called with an adverb.
By the way, while this clearly should be an error, and the interpreter
indeed seems to give syntax error in such a case, as demonstrated by
the code below, the description of "syntax error" in the dictionary
appendix does not say that this should be that error in particular.
This could be considered a documentation bug.
a=: 1 :('1!:2&2''[a]''';'/')
b=: 1 :('1!:2&2''[b]''';'1+u')
1 (b b)
[b]
[b]
3
1 (b a)
[b]
[a]
/
1 (a b)
[a]
|syntax error
| 1(a b)
Ambrus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm