With these notions, we can rewrite...
l.reset()
while (we can read a token) {
if (token is a paragraph break) {
l.print(); l.reset();
} else {
word = token;
if (!l.canfit(word)) {
l.print(); l.reset()
}
l.append(word)
}
}
l.print(); l.reset()
Previous slide
Next slide
Back to first slide
View graphic version