I decided I needed a "quote my argument appropriately, for
simple atoms" verb, so I threw this together:

arg=: monad define
  if. (3!:0 y) e. 2 131072 do.
    ' ''','''',~y#~1+''''=y
  else.
    ' ',":y
  end.

)
   ;arg each 1;'1'
 1 '1'

That's fairly arbitrary, so I am happy leaving it as an explicit
definition, but it occurred to me that this or something like
this might have been defined already.  So I went looking for
.ijs files containing 131072 and I found a fair number of
minor variations on this theme -- several CHARTYPE
variations and several ischar variations, and a few others.

It's almost enough to convince me to try John Baker's
JOD.

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

Reply via email to