Talk:Align columns: Difference between revisions

Content added Content deleted
(→‎J solution: aesthetic improvement)
Line 3: Line 3:
I haven't read the J solution in depth yet, but it appears more complex than may be necessary. For example, with <tt>'LEFT CENTER RIGHT'=:i.3</tt> we can solve the task thus:
I haven't read the J solution in depth yet, but it appears more complex than may be necessary. For example, with <tt>'LEFT CENTER RIGHT'=:i.3</tt> we can solve the task thus:


(#~ 0 1 $~ #) (9!:17 CENTER #~ 2 [ 9!:7 ' '$~11) (]":) <;._2@:,~&> /'$';LF;text
_2 {:\ ": <;._2@:,~&>/'$';LF;text [ 9!:17 CENTER #~ 2 [ 9!:7 ' '$~11
Given a text file of many lines, where fields within a line
Given a text file of many lines, where fields within a line
are delineated by a single 'dollar' character, write a program
are delineated by a single 'dollar' character, write a program