Calendar - for "REAL" programmers: Difference between revisions
Calendar - for "REAL" programmers (view source)
Revision as of 00:32, 10 December 2014
, 9 years ago→{{header|J}}
m (→{{header|REXX}}: reduced interline spacing.) |
m (→{{header|J}}) |
||
Line 755:
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...)
Here's an example calendar (the first line <code>132 F 1969</code> being the command that build this calendar):
|