> array =: 0 1 2 3...
> 4 5 6 7...
> 8 9 10 11...
>
> I would like to do a "line continuation" at the end of every line
> but have no idea how to do it.  I searched the literature for a
> couple hours but didn't find anything.
>
> Is this possible?

array=: _". (0 :0)-.LF
   0 1 2 3
   4 5 6 7
   8 9 10 11
)

Note that this assumes that lines are indented.

If that is a problem for you -- if you want newlines
treated as whitespace, you could instead use

require'strings'
array=: _". (LF,' ')charsub 0 :0

FYI,

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

Reply via email to