Calendar - for "REAL" programmers: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: reduced interline spacing.)
Line 755: Line 755:
E: given a textual table and a width, center the text within that width (assuming it fits)
E: given a textual table and a width, center the text within that width (assuming it fits)


F: <code>width F year</code> gives us our formatted calendar. We do a little extra work here to make sure that a 20 character wide calendar can be displayed. (In that case, we trim off the left and right borders. We use the same trimming code in all cases, but typically we trim empty space added specially for this purpose. That said, the 20 character wide thing seems to be gone from the task description so perhaps this definition should be simplified...)
F: <code>width F year</code> gives us our formatted calendar


Here's an example calendar (the first line <code>132 F 1969</code> being the command that build this calendar):
Here's an example calendar (the first line <code>132 F 1969</code> being the command that build this calendar):