Align columns: Difference between revisions
Content added Content deleted
(Clarification on adding separators and (miss)use of e.g. HTML.) |
m (→{{header|REXX}}: added comments, add DO-END labels, removed blank lines. -- ~~~~) |
||
Line 2,722: | Line 2,722: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
===version 1=== |
===version 1=== |
||
<lang rexx> |
<lang rexx>/*REXX*/ |
||
z.1 = "Given$a$text$file$of$many$lines,$where$fields$within$a$line$" |
z.1 = "Given$a$text$file$of$many$lines,$where$fields$within$a$line$" |
||
z.2 = "are$delineated$by$a$single$'dollar'$character,$write$a$program" |
z.2 = "are$delineated$by$a$single$'dollar'$character,$write$a$program" |
||
Line 2,807: | Line 2,807: | ||
say |
say |
||
end /*j*/</lang> |
end /*j*/</lang> |
||
'''output''' |
|||
Output: |
|||
<pre style="height:30ex;overflow:scroll"> |
<pre style="height:30ex;overflow:scroll"> |
||
Line 2,835: | Line 2,835: | ||
Further, allow for each word in a column to be either left |
Further, allow for each word in a column to be either left |
||
justified, right justified, or center justified within its column. |
justified, right justified, or center justified within its column. |
||
</pre> |
</pre> |
||
===version 3=== |
===version 3=== |
||
Line 2,883: | Line 2,881: | ||
say translate(bot,'┴',"┬"); say; say |
say translate(bot,'┴',"┬"); say; say |
||
end /*j*/</lang> |
end /*j*/</lang> |
||
'''output''' |
|||
Output: |
|||
<pre style="height:30ex;overflow:scroll"> |
<pre style="height:30ex;overflow:scroll"> |
||
===============================================left aligned=============================================== |
===============================================left aligned=============================================== |