Content added Content deleted
|
|
Line 944: |
Line 944: |
|
|
|
|
|
=={{header|Arturo}}== |
|
=={{header|Arturo}}== |
|
<lang rebol>text: |
|
<lang rebol>text: { |
|
⚫ |
Given$a$text$file$of$many$lines,$where$fields$within$a$line$ |
|
--- |
|
|
⚫ |
are$delineated$by$a$single$'dollar'$character,$write$a$program |
⚫ |
Given$a$text$file$of$many$lines,$where$fields$within$a$line$ |
|
|
⚫ |
that$aligns$each$column$of$fields$by$ensuring$that$words$in$each$ |
⚫ |
are$delineated$by$a$single$'dollar'$character,$write$a$program |
|
|
⚫ |
column$are$separated$by$at$least$one$space. |
⚫ |
that$aligns$each$column$of$fields$by$ensuring$that$words$in$each$ |
|
|
⚫ |
Further,$allow$for$each$word$in$a$column$to$be$either$left$ |
⚫ |
column$are$separated$by$at$least$one$space. |
|
|
⚫ |
justified,$right$justified,$or$center$justified$within$its$column. |
⚫ |
Further,$allow$for$each$word$in$a$column$to$be$either$left$ |
|
|
|
} |
⚫ |
justified,$right$justified,$or$center$justified$within$its$column. |
|
|
--- |
|
|
|
|
|
|
output: map split.lines text => [split.by:"$"] |
|
output: map split.lines text => [split.by:"$"] |
|
|
|
|
|
loop output 'line [ |
|
loop output 'line [ |
|
loop line 'word -> prints pad word 12
|
|
loop line 'word -> prints pad word 12 |
|
print ""
|
|
print "" |
|
]</lang> |
|
]</lang> |
|
|
|
|