PS 4

b. geilfuss

4.1


4.2 Expand/Contract

My expand algorithm places incremental amounts of space between each character. Most of the messy work was getting a string with carriage returns to display properly with out losing it's indents (from having spaces inserted into them). What this means is that what you see is NOT exactly what there is- Expanders at the beginnings of new lines are not expanded. One kink seems to exists where some carriage-return-including strings will contract all the way to nothing regardless of how many interim levels of stuff has been inserted. (Something must be slightly off in my algorithm for determining what the last string looked like before being contracted...)

4.3 EXPAND/CONTRACT/PARSE/PUNCTUATE

Hmm. This SHOULD do the following: replace punctiuation marks like '.' and '-' with the words 'hyphen' and 'period' as a version of EXPAND. It also reverses the procedure. The way I'm trying to code it, this function does not work in the same EXPAND/CONTRACT vein though- but rather these are XOR variables. what I want to see is a sort of counterpoint at times - as most of the text expands, 'peroid' could shrink, or '.' could expand to 'period' (but not with space added between it) so they'd be sort of anchor points.