Calendar - for "REAL" programmers: Difference between revisions
Content added Content deleted
m (→{{header|Ada}}) |
m (→{{header|REXX}}: re-did the section header comments, change output templete, removed extra blank lines. -- ~~~~) |
||
Line 496: | Line 496: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
This is essentially the same REXX program as for the CALENDAR task, but written entirely |
This is essentially the same REXX program as for the CALENDAR task, but written entirely in uppercase. Indeed, |
||
<br> |
<br>it could be written without any Latin (or any language) letters of any kind for the REXX program's variables. |
||
⚫ | |||
<br>of any kind for the REXX program's variables. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
<br>[Note: the command line may also be all uppercase.] |
<br>[Note: the command line may also be all uppercase.] |
||
<br>In any case, both versions of the programs' output are identical (but the second REXX |
<br><br>In any case, both versions of the programs' output are identical (but the second REXX version sure as heck looks |
||
<br> |
<br>like it was beat with a big ole ugly stick ─── and pardon the strong language). |
||
⚫ | |||
<lang rexx> |
|||
⚫ | |||
@ABC= |
@ABC= |
||
DO J=0 TO 255;_=D2C(J);IF DATATYPE(_,'L') THEN @ABC=@ABC||_;END |
DO J=0 TO 255;_=D2C(J);IF DATATYPE(_,'L') THEN @ABC=@ABC||_;END |
||
Line 678: | Line 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 |
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 |
TELL:SAY ARG(1);RETURN |
||
UNGRID:RETURN TRANSLATE(ARG(1),,"│║─═┤┐└┴┬├┼┘┌╔╗╚╝╟╢╞╡╫╪╤╧╥╨╠╣") |
UNGRID:RETURN TRANSLATE(ARG(1),,"│║─═┤┐└┴┬├┼┘┌╔╗╚╝╟╢╞╡╫╪╤╧╥╨╠╣")</lang> |
||
⚫ | |||
</lang> |
|||
⚫ | |||
<pre style="height:40ex;overflow:scroll"> |
<pre style="height:40ex;overflow:scroll"> |
||
«Snoopy "picture" here» |
«Snoopy "picture" here» |