Both JfC and LJ mention a 'solo colon' separating the monadic from the
dyadic cases of an explicit verb. Unaware of this, I got caught out recently
by adding a comment after the colon. J doesn't like it!

   foo=: 3 : 0
-y
:
x-y
)
   foo 3
_3
   5 foo 3
2

0K! But ...

   foo=: 3 : 0
-y
:    NB. No comments allowed on this line!
x-y
)

   foo 3
|value error: x
|       x-y
   5 foo 3
|domain error: foo
|   5     foo 3

It appears that the colon should be oh so solo!

Regards

Graham

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to