Next: , Previous: , Up: Formatted Input/Output   [Contents][Index]


4.3.6 Long output lines

When generating output, if LUX finds that some text to be printed to the screen is too long to fit on the current screen line, then it looks for good places to break the line into pieces that are short enough to each fit on a separate line on the screen. If the text to be printed begins with whitespace, then LUX assumes that you prefer the text to be broken between punctuation characters (i.e., not alphabetical or numerical or whitespace characters) or between a non-whitespace character and whitespace. If the text does not begin with whitespace, then LUX assumes that any whitespace in the text is there merely to separate non-whitespace words, and any whitespace at the beginning of new screen lines will be suppressed.

If filling up the screen line completely means that LUX’s preferences are not met, then LUX will back up to the last earlier location that meets the preferences. For this purpose, LUX assumes the screen to be !col characters wide. The initial value of this variable is taken from #col, which itself is determined by the actual width of your screen or text window when LUX was first started. You cannot change #col, but you can set !col to any desired value and thereby change how wide LUX assumes the screen to be. If you resize the text window then you must change !col manually to reflect the new width.

LUX knows how newlines (\n) and carriage returns (\r) affect the cursor position, but assumes that other special characters (such as \a, \f, and \b) as ordinary characters. If you use special characters that do not advance the cursor by exactly one position, then you may not get nicely formatted results.


Next: , Previous: , Up: Formatted Input/Output   [Contents][Index]