Word wrap: Difference between revisions

m
(→‎{{header|Ada}}: Added Ada version)
Line 136:
 
Output, set to 72 lines (with input picked by cut-and-paste from the task description):
 
 
<pre>Even today, with proportional fonts and complex layouts, there are still
cases where you need to wrap text at a specified column. The basic task
Line 157 ⟶ 155:
the two algorithms give different results.</pre>
 
Note that this solution properly deals with multi-paragraph inputs.
For the extra credit, one could derive a class Word_Wrap.Advanced from Word_Wrap.Basic.
For more sophisticated algorithms (the extra credit), one could derive
For the extra credit, one could derive a class Word_Wrap.Advanced<something> from Word_Wrap.Basic.
 
=={{header|AWK}}==
Anonymous user