Align columns: Difference between revisions

m
→‎version 2: changed minor assignments. -- ~~~~
m (→‎version 2: changed minor assignments. -- ~~~~)
Line 2,879:
===version 2===
<lang rexx>/*REXX program to display various alignments. */
cols=0; size=0; wid.=0; t.=''; @.=''
 
t.1 = "Given$a$text$file$of$many$lines,$where$fields$within$a$line$"
Line 2,908:
if j==2 then _=_ right(x,wid.c)
if j==3 then _=_ centre(x,wid.c)
end /*c*/
say substr(_,2)
end /*r*/
say
end /*j*/</lang>
Line 2,942:
justified, right justified, or center justified within its column.
</pre>
 
===version 3===
Note: This version adds boxes around columns of output.