Word wrap: Difference between revisions

Content added Content deleted
Line 11: Line 11:
=={{header|Ada}}==
=={{header|Ada}}==


The specification of a class Word_Wrap.Basic in a package Word_Wrap:
The specification of a class '''Word_Wrap.Basic''' in a package '''Word_Wrap''':
<lang Ada>generic
<lang Ada>generic
with procedure Put_Line(Line: String);
with procedure Put_Line(Line: String);
Line 157: Line 157:
Note that this solution properly deals with multi-paragraph inputs.
Note that this solution properly deals with multi-paragraph inputs.
For more sophisticated algorithms (the extra credit), one could derive
For more sophisticated algorithms (the extra credit), one could derive
a class Word_Wrap.<something> from Word_Wrap.Basic.
a class '''Word_Wrap.<something>''' from '''Word_Wrap.Basic'''.


=={{header|AWK}}==
=={{header|AWK}}==