Align columns: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 1,315: | Line 1,315: | ||
// display: |
// display: |
||
Token Sep ("") |
Token Sep ("") |
||
Print("Left:\n", display Left, Newl, "Right:\n", display Right, Newl, "Center:\n", display Center,Newl) |
Print("Left Pad:\n", display Left, Newl, "Right Pad:\n", display Right, Newl, "Center Pad:\n", display Center,Newl) |
||
End |
End |
||
</lang> |
</lang> |
||
Line 1,322: | Line 1,322: | ||
<pre> |
<pre> |
||
$ hopper src/acolumns.bas sample.txt "$" |
$ hopper src/acolumns.bas sample.txt "$" |
||
Left: |
Left Pad: |
||
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 |
||
Line 1,330: | Line 1,330: | ||
justified, right justified, or center justified within its column. |
justified, right justified, or center justified within its column. |
||
Right: |
Right Pad: |
||
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 |
||
Line 1,338: | Line 1,338: | ||
justified, right justified, or center justified within its column. |
justified, right justified, or center justified within its column. |
||
Center: |
Center Pad: |
||
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 |
||
Line 1,347: | Line 1,347: | ||
$ |
$ |
||
</pre> |
</pre> |
||
=={{header|AppleScript}}== |
=={{header|AppleScript}}== |
||