Calendar - for "REAL" programmers: Difference between revisions

m
→‎{{header|REXX}}: re-did the section header comments, change output templete, removed extra blank lines. -- ~~~~
m (→‎{{header|REXX}}: re-did the section header comments, change output templete, removed extra blank lines. -- ~~~~)
Line 496:
 
=={{header|REXX}}==
This is essentially the same REXX program as for the CALENDAR task, but written entirely in uppercase. Indeed,
<br>in uppercase. Indeed, it could be written without any Latin (or any language) letters of any kind for the REXX program's variables.
<br><br>From the task's description, I took it to mean the program was to be in all uppercase, but the output was
<br>of any kind for the REXX program's variables.
<br>the output was still supposed to look pretty (that is, partly in lowercase). Even so, on the (line) printers that Iwere grew up on,used
<br><br>From the task's description, I took it to mean the program was to be in all uppercase, but
<br>long ago, the printers (if not supporting lowercase), would print lowercase as uppercase (with the FOLD option).
<br>the output was still supposed to look pretty. Even so, on the printers that I grew up on,
<br><br>The other REXX program made use of lowercase letters for determining the minimum length of any of the options
<br>the printers (if not supporting lowercase), would print lowercase as uppercase (the FOLD option).
<br>any of the options (from the command line), and a few stupidsimple tricks were used to accomplish this.
<br><br>The other REXX program made use of lowercase letters for determining the minimum length of
<br>any of the options (from the command line), and a few stupid tricks were used to accomplish this.
<br>[Note: the command line may also be all uppercase.]
<br><br>In any case, both versions of the programs' output are identical (but the second REXX programversion sure as heck looks
<br>sure as heck lookslike it was beat with ana big ole ugly stick ─── and pardon the strong language).
<lang rexx>/*REXX PROGRAM TO SHOW ANY YEAR'S (MONTHLY) CALENDAR (WITH/WITHOUT GRID)*/
<lang rexx>
/*REXX PROGRAM TO SHOW ANY YEAR'S (MONTHLY) CALENDAR (WITH/WITHOUT GRID)*/
 
@ABC=
DO J=0 TO 255;_=D2C(J);IF DATATYPE(_,'L') THEN @ABC=@ABC||_;END
Line 678 ⟶ 675:
PUT:_=ARG(1);_=TRANSLATE(_,,'_'CHK);IF \GRID THEN _=UNGRID(_);IF LOWERCASE THEN _=LOWER(_);IF UPPERCASE THEN UPPER _;IF SHORTEST&_=' ' THEN RETURN;CALL TELL _;RETURN
TELL:SAY ARG(1);RETURN
UNGRID:RETURN TRANSLATE(ARG(1),,"│║─═┤┐└┴┬├┼┘┌╔╗╚╝╟╢╞╡╫╪╤╧╥╨╠╣")</lang>
Output '''output''' when using the input of: <tt> 1/1/1969 (noGrid shortest narrowest)
</lang>
Output when using the input of: <tt> 1/1/1969 (noGrid shortest narrowest)
<pre style="height:40ex;overflow:scroll">
«Snoopy "picture" here»