Calendar - for "REAL" programmers: Difference between revisions

m
Automated syntax highlighting fixup (second round - minor fixes)
m (syntax highlighting fixup automation)
m (Automated syntax highlighting fixup (second round - minor fixes))
Line 1:
[[Category:Handicap]]
{{task|Date and time}}
 
Line 32 ⟶ 33:
'''Trivia:''' The terms uppercase and lowercase date back to the early days of the mechanical printing press. Individual metal alloy casts of each needed letter, or punctuation symbol, were meticulously added to a press block, by hand, before rolling out copies of a page. These metal casts were stored and organized in wooden cases. The more often needed ''minuscule'' letters were placed closer to hand, in the lower cases of the work bench. The less often needed, capitalized, ''majuscule'' letters, ended up in the harder to reach upper cases.
<br><br>
 
=={{header|360 Assembly}}==
<!-- Calendar for real programmers -->
This is for real programmers who code only in assembler :). The code could have been run in april 1964, punched on
80-column cards, read on a card reader, and printed with a 132-column line printer on fan-folded paper with perforated edges.
<syntaxhighlight lang="360asm">* CALENDAR FOR REAL PROGRAMMERS 05/03/2017
CALENDAR CSECT
USING CALENDAR,R13 BASE REGISTER
Line 237:
28 29 30 31 25 26 27 28 29 30 31 29 30 27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
 
=={{header|Ada}}==
 
Line 243 ⟶ 242:
Instead of doing that, the implementation below reuses the package "PRINTABLE_CALENDAR" (same as "Printable_Calendar" or "printable_calendar") from [[Calendar#Ada|the calendar task]]:
 
<syntaxhighlight lang=Ada"ada">WITH PRINTABLE_CALENDAR;
 
PROCEDURE REAL_CAL IS
Line 288 ⟶ 287:
 
To change the output to 80-character devices, replace "INIT_132" by "INIT_80".
 
=={{header|ALGOL 68}}==
{{works with|ALGOL 68|Revision 1 - no extensions to language used}}
Line 296 ⟶ 294:
 
Note: to run this code with [[ALGOL 68G]] you need to use the '''--quote-stropping''' option.
<syntaxhighlight lang="algol68">'PR' QUOTE 'PR'
'PROC' PRINT CALENDAR = ('INT' YEAR, PAGE WIDTH)'VOID': 'BEGIN'
Line 426 ⟶ 424:
31 30
</pre>
 
=={{header|AutoHotkey}}==
<syntaxhighlight lang=AutoHotkey"autohotkey">CALENDAR(YR){
LASTDAY := [], DAY := []
TITLES =
Line 467 ⟶ 464:
RETURN RES
}</syntaxhighlight>
Examples:<syntaxhighlight lang=AutoHotkey"autohotkey">EXAMPLES:
GUI, FONT,S8, COURIER
GUI, ADD, EDIT, VYR W40 R1 LIMIT4 NUMBER, 1969
Line 522 ⟶ 519:
30
</pre>
 
=={{header|BaCon}}==
Choosing 132 character output. Same as the "Calendar" from [[Calendar#BaCon|the calendar task]] but using all capitals:
<syntaxhighlight lang="freebasic">DECLARE MON$[] = { "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER" }
DECLARE MON[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
Y$ = "1969"
Line 579 ⟶ 575:
28 29 30 31 25 26 27 28 29 30 31 29 30 27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
 
=={{header|BBC BASIC}}==
{{works with|BBC BASIC for Windows}}
<syntaxhighlight lang="bbcbasic"> VDU 23,22,1056;336;8,16,16,128
YEAR = 1969
Line 651 ⟶ 646:
27 28 29 30 31 24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
31 30</pre>
 
=={{header|C}}==
<b>Note:</b> Historically, some UNIX systems were connected to upper-case only terminals, and users of those systems needed to write C programs. One could configure the terminal using the "stty" command, setting the olcuc and iuclc options to translate uppercase to lowercase on input, and convert lowercase to uppercase on output (although typically the setting was applied by the "getty" program so that logging in would be possible).
Line 670 ⟶ 664:
tcc -DSTRUCT=struct -DCONST=const -DINT=int -DCHAR=char -DVOID=void -DMAIN=main -DIF=if -DELSE=else -DWHILE=while -DFOR=for -DDO=do -DBREAK=break -DRETURN=return -DPUTCHAR=putchar UCCALENDAR.c
</pre>
<syntaxhighlight lang="c">/* UPPER CASE ONLY VERSION OF THE ORIGINAL CALENDAR.C, CHANGES MOSTLY TO AVOID NEEDING #INCLUDES */
/* ERROR MESSAGES GO TO STDOUT TO SLIGHTLY SIMPLIFY THE I/O HANDLING */
/* WHEN COMPILING THIS, THE COMMAND LINE SHOULD SPECIFY -D OPTIONS FOR THE FOLLOWING WORDS: */
Line 836 ⟶ 830:
RETURN RESULT;
}</syntaxhighlight>
 
=={{header|COBOL}}==
Although it seems to be missing the pinup of Snoopy, see [[Calendar#COBOL|COBOL Calendar task entry]]
where the code, and output, is already an example of a "REAL programmer" calendar; even down to the 6 character, all uppercase, program name ''CALEND''.
 
=={{header|Common Lisp}}==
<syntaxhighlight lang="lisp">(QL:QUICKLOAD '(DATE-CALC))
 
(DEFPARAMETER *DAY-ROW* "SU MO TU WE TH FR SA")
Line 955 ⟶ 947:
30
NIL</pre>
 
=={{header|D}}==
D keywords are lower case, so this silly solution uses the whole Calendar Task code, with small changes and all in upper case, in a text file named "CALENDAR":
Line 1,012 ⟶ 1,003:
 
Then in another source code file there is a little loader, that imports it and mixes-in it (for safety this program must be compiled with <code>-Jsomepath</code>):
<syntaxhighlight lang="d">import std.string;mixin(import("CALENDAR").toLower);void main(){}</syntaxhighlight>
{{out}}
<pre> [Snoopy Picture]
Line 1,052 ⟶ 1,043:
26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
30 </pre>
 
=={{header|Elena}}==
ELENA 5.0 :
<syntaxhighlight lang="elena">import system'text;
import system'routines;
import system'calendar;
Line 1,254 ⟶ 1,244:
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
 
=={{header|Fortran}}==
Alas, the header "FORTRAN" is not recognised - REAL programmers were absent that day? Even upon the apperance of lower case, I have preferred to use shouting for programme source, and normal upper/lower case for commentary. Aside from petty details such as 1 and l being nowhere as distinct as 1 and L, this allows the two sorts of blather to be identifiably different without ratiocination as the hours drag past. Further, the names of variables can easily be distinguished from the same word in discussion, as in ... the text in TEXT will be printed as the subtitle to the text in TITLE ... Anyway, in the spirit of old, herewith the source without tedious commentary:
<syntaxhighlight lang=FORTRAN"fortran">
MODULE DATEGNASH
 
Line 1,456 ⟶ 1,445:
</pre>
Actual lineprinters offer the opportunity of overprinting lines so double (or triple) printing of the same text gave a '''bold''' effect if with some blurring due to wobble. Further decoration was possible: via underlines (and for overlines, an underline on the previous line) the appearance can be improved. Vertical bars can also be used, and more advanced lineprinters (IBM1403 etc. using the "TN" chain) or dot-matrix printers also supplied "corner" glyphs so that boxes would not have leaks.
 
=={{header|FreeBASIC}}==
<syntaxhighlight lang="freebasic">' VERSION 16-03-2016
' COMPILE WITH: FBC -S CONSOLE
 
Line 1,575 ⟶ 1,563:
21 22 23 24 25 26 27 18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26 17 18 19 20 21 22 23 22 23 24 25 26 27 28
28 29 30 31 25 26 27 28 29 30 31 29 30 27 28 29 30 31 24 25 26 27 28 29 30 29 30 31 </pre>
 
=={{header|Go}}==
Go is case-sensitive: all its keywords and certain other identifiers/verbs are lower case and imported functions etc. are title case. Consequently, it is impossible to run an upper case version of the Calendar task program as it stands. So what I've done instead is to follow the approach of the Kotlin entry:
Line 1,584 ⟶ 1,571:
 
This is realcal_UC.txt:
<syntaxhighlight lang="go">PACKAGE MAIN
IMPORT (
Line 1,657 ⟶ 1,644:
 
and this is realcal.go:
<syntaxhighlight lang="go">package main
 
import (
Line 1,740 ⟶ 1,727:
30
</pre>
 
=={{header|GUISS}}==
 
In Graphical User Interface Support Script, we utilize applications that are already written. So for this task, we shall just display the calendar that sets the system clock.
 
<syntaxhighlight lang="guiss">RIGHTCLICK:CLOCK,ADJUST DATE AND TIME,BUTTON:CANCEL</syntaxhighlight>
 
=={{header|Icon}} and {{header|Unicon}}==
Icon and Unicon don't lend themselves to ''REAL'' programming in the sense of this task easily. And initially this task was marked ''omit'' because the primary declarations, reserved words, and the name of the ''main'' procedure are all in lowercase. However, getting in the spirit of the task real programmers do not give up and a number of solutions are possible:
Line 1,768 ⟶ 1,753:
Also it makes me go all nostalgic for my old [[WATFIVE]] compiler. And an IBM 129 keypunch. And 5 hole paper tape.
 
<syntaxhighlight lang=Unicon"unicon">$include "REALIZE.ICN"
 
LINK DATETIME
Line 1,820 ⟶ 1,805:
Where REALIZE.ICN would be something like this (this example is incomplete but sufficient for this program):
 
<syntaxhighlight lang=Icon"icon">$define PROCEDURE procedure
$define END end
$define WRITE write
Line 1,850 ⟶ 1,835:
{{libheader|Icon Programming Library}}
[http://www.cs.arizona.edu/icon/library/src/procs/DATETIME.ICN DATETIME.ICN provides IsLeapYear and julian]
 
=={{header|J}}==
For added "real"ness, we also only use 1 character names:
 
<syntaxhighlight lang=J"j">B=: + 4 100 400 -/@:<.@:%~ <:
M=: 28+ 3, (10$5$3 2),~ 0 ~:/@:= 4 100 400 | ]
R=: (7 -@| B+ 0, +/\@}:@M) |."0 1 (0,#\#~41) (]&:>: *"1 >/)~ M
Line 1,885 ⟶ 1,869:
Here's an example calendar (the first line <code>132 F 1969</code> being the command that build this calendar):
 
<syntaxhighlight lang="text"> 132 F 1969
[INSERT SNOOPY HERE]
1969
Line 1,910 ⟶ 1,894:
 
Note that this version of F will work fine with a left argument of 20 (why anyone felt that this was important to mention is perhaps best thought of as an issue lost in history).
 
=={{header|Julia}}==
Julia code is a valid data type in Julia. Executable code can be created from a String with Meta.parse() and run with eval.
This example does require a small function with Julia's lowercase keywords, perhaps loaded on startup from a separate file.
<syntaxhighlight lang="julia">
# IF THIS SMALL FUNCTION IS PLACED IN THE STARTUP.JL
# FILE, IT WILL BE LOADED ON STARTUP. THE REST OF
Line 1,994 ⟶ 1,977:
 
</pre>
 
=={{header|Kotlin}}==
Kotlin is case-sensitive: all its keywords and packages are lower case, all its library classes are mixed case and its library functions are either lower case or mixed case. Consequently, it is impossible to run an upper case version of the Calendar task program as it stands. So what I've done instead (and similar to what several other languages in the same boat have done) is:
Line 2,004 ⟶ 1,986:
This is calendar_UC.txt:
 
<syntaxhighlight lang="scala">IMPORT JAVA.TEXT.*
IMPORT JAVA.UTIL.*
IMPORT JAVA.IO.PRINTSTREAM
Line 2,059 ⟶ 2,041:
and this is real_calendar.kt:
 
<syntaxhighlight lang="scala">// version 1.1.3
 
import java.io.File
Line 2,146 ⟶ 2,128:
which generates (on disk) calendar_NC.kt:
 
<syntaxhighlight lang="scala">import java.text.*
import java.util.*
import java.io.PrintStream
Line 2,241 ⟶ 2,223:
30
</pre>
 
=={{header|Lua}}==
Tested with Lua 5.3.2
Line 2,249 ⟶ 2,230:
The upper case Lua source - stored in a file called UCCALENDAR.LUU:
<br>
<syntaxhighlight lang="lua">FUNCTION PRINT_CAL(YEAR)
LOCAL MONTHS={"JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE",
"JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"}
Line 2,314 ⟶ 2,295:
</syntaxhighlight>
The following "one-liner" standard Lua source will down-case and run the program in the source file specified as it's parameter (file luu.lua):
<syntaxhighlight lang="lua">do io.input( arg[ 1 ] ); local s = io.read( "*a" ):lower(); io.close(); assert( load( s ) )() end
</syntaxhighlight>
The following command will execute the UCCALENDAR.LUU source (replace lua532 with the appropriate command for your system):
Line 2,364 ⟶ 2,345:
</pre>
 
=={{header|M2000 Interpreter}}==
Console 132 characters by 43 lines. Six columns for months.
 
<syntaxhighlight lang=M2000"m2000 Interpreterinterpreter">
\\ Calendar - for "REAL" programmers
\\ All statements in UPPERCASE
Line 2,517 ⟶ 2,497:
RETURN
</syntaxhighlight>
 
=={{header|Nim}}==
Nim is a peculiar language regarding case sensitivity. First, keywords are all in lowercase. Second, Nim is case sensitive regarding the first character only. That means that ''Thing'' is different of ''thing'' but identical to ''THING''. There are several conventions regarding the style. For instance, the first character of a type should be in uppercase while the first character of a procedure or a variable should be in lowercase. Nim is also style-insensitive which means that "myvar", "myVar" and "my_var" are equivalent identifiers.
Line 2,527 ⟶ 2,506:
Here is the helper program:
 
<syntaxhighlight lang="text">import strutils
 
const progUpper = staticRead("calendar_upper.txt")
Line 2,561 ⟶ 2,540:
Here is the actual program in uppercase.
 
<syntaxhighlight lang="text">IMPORT TIMES
IMPORT STRFORMAT
Line 2,632 ⟶ 2,611:
24 25 26 27 28 29 30 29 30 31
</pre>
 
=={{header|Perl}}==
Since we can't use <code>eval</code> or <code>print</code> (or any other keywords)
at the top level, we need to abuse backticks in order to print anything, as in [http://www.perlmonks.org/?node_id=43797 the infamous JAPH with no letters or numbers]. Consequently, the calendar is printed to standard error instead of standard output.
 
<syntaxhighlight lang="perl">$PROGRAM = '\'
 
MY @START_DOW = (3, 6, 6, 2, 4, 0,
Line 2,681 ⟶ 2,659:
 
`${E}${C}${H}${O} $PROGRAM | ${T}${R} A-Z ${A}-${Z} | ${P}${E}${R}${L}`;</syntaxhighlight>
Although, if we are abusing the backticks and other innocent programs, why not just: <syntaxhighlight lang=Perl"perl">$_=$ARGV[0]//1969;`\143\141\154 $_ >&2`</syntaxhighlight>
 
=={{header|Phix}}==
I'm not going to take this too seriously and instead treat it as a good opportunity to showcase how trivial it is to make some rather fundamental changes to the compiler.
 
So, the first task is to take a copy of [[Calendar#Phix|Calendar]] and make it output uppercase. Change the line
<!--<syntaxhighlight lang=Phix"phix">(phixonline)-->
<span style="color: #008080;">return</span> <span style="color: #7060A8;">repeat</span><span style="color: #0000FF;">(</span><span style="color: #008000;">' '</span><span style="color: #0000FF;">,</span><span style="color: #000000;">left</span><span style="color: #0000FF;">)&</span><span style="color: #000000;">s</span><span style="color: #0000FF;">&</span><span style="color: #7060A8;">repeat</span><span style="color: #0000FF;">(</span><span style="color: #008000;">' '</span><span style="color: #0000FF;">,</span><span style="color: #000000;">right</span><span style="color: #0000FF;">)</span>
<!--</syntaxhighlight>-->
in routine centre to:
<!--<syntaxhighlight lang=Phix"phix">(phixonline)-->
<span style="color: #008080;">return</span> <span style="color: #7060A8;">repeat</span><span style="color: #0000FF;">(</span><span style="color: #008000;">' '</span><span style="color: #0000FF;">,</span><span style="color: #000000;">left</span><span style="color: #0000FF;">)&</span><span style="color: #7060A8;">upper</span><span style="color: #0000FF;">(</span><span style="color: #000000;">s</span><span style="color: #0000FF;">)&</span><span style="color: #7060A8;">repeat</span><span style="color: #0000FF;">(</span><span style="color: #008000;">' '</span><span style="color: #0000FF;">,</span><span style="color: #000000;">right</span><span style="color: #0000FF;">)</span>
<!--</syntaxhighlight>-->
Line 2,698 ⟶ 2,675:
 
In psym.e you can find the line
<!--<syntaxhighlight lang=Phix"phix">(phixonline)-->
<span style="color: #000000;">initialSymEntry</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"integer"</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">S_Type</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"TI"</span><span style="color: #0000FF;">,</span><span style="color: #000000;">opInt</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">E_none</span><span style="color: #0000FF;">)</span> <span style="color: #000080;font-style:italic;">-- #01 / 0b0001 integer</span>
<!--</syntaxhighlight>-->
Immediately after that (it should now be there commented out) add:
<!--<syntaxhighlight lang=Phix"phix">(phixonline)-->
<span style="color: #000000;">Alias</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"INTEGER"</span><span style="color: #0000FF;">,</span><span style="color: #000000;">symlimit</span><span style="color: #0000FF;">)</span>
<!--</syntaxhighlight>-->
Line 2,709 ⟶ 2,686:
 
Keywords are handled slightly differently: In pttree.e we need a new alias routine (you should find this one commented out, from when I was testing all this):
<!--<syntaxhighlight lang=Phix"phix">(phixonline)-->
<span style="color: #008080;">procedure</span> <span style="color: #000000;">tt_stringA</span><span style="color: #0000FF;">(</span><span style="color: #004080;">sequence</span> <span style="color: #000000;">text</span><span style="color: #0000FF;">,</span> <span style="color: #004080;">integer</span> <span style="color: #000000;">alias</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">tt_string</span><span style="color: #0000FF;">(</span><span style="color: #000000;">text</span><span style="color: #0000FF;">,-</span><span style="color: #000000;">2</span><span style="color: #0000FF;">)</span>
Line 2,716 ⟶ 2,693:
<!--</syntaxhighlight>-->
and you can find the line
<!--<syntaxhighlight lang=Phix"phix">(phixonline)-->
<span style="color: #008080;">global</span> <span style="color: #008080;">constant</span> <span style="color: #000000;">T_include</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">596</span> <span style="color: #000000;">tt_stringF</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"include"</span><span style="color: #0000FF;">,</span><span style="color: #000000;">T_include</span><span style="color: #0000FF;">)</span>
<!--</syntaxhighlight>-->
Sometime after that, in fact after the very last use of tt_stringF, add (likewise you should find this one commented out):
<!--<syntaxhighlight lang=Phix"phix">(phixonline)-->
<span style="color: #000000;">tt_stringA</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"INCLUDE"</span><span style="color: #0000FF;">,</span><span style="color: #000000;">T_include</span><span style="color: #0000FF;">)</span>
<!--</syntaxhighlight>-->
Line 2,728 ⟶ 2,705:
Currently ptok.e recognises <code>\n</code> but not <code>\N</code>. Search for all references to <code>escchar</code> (there should be one definition and two references) and make sure the character being
checked is mapped to lower case, ie change (twice)
<!--<syntaxhighlight lang=Phix"phix">(phixonline)-->
<span style="color: #000000;">Ch</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">find</span><span style="color: #0000FF;">(</span><span style="color: #000000;">Ch</span><span style="color: #0000FF;">,</span><span style="color: #000000;">escchar</span><span style="color: #0000FF;">)</span>
<!--</syntaxhighlight>-->
to
<!--<syntaxhighlight lang=Phix"phix">(phixonline)-->
<span style="color: #000000;">Ch</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">find</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">lower</span><span style="color: #0000FF;">(</span><span style="color: #000000;">Ch</span><span style="color: #0000FF;">),</span><span style="color: #000000;">escchar</span><span style="color: #0000FF;">)</span>
<!--</syntaxhighlight>-->
Line 2,744 ⟶ 2,721:
 
Finally, you can take that copy of [[Calendar#Phix|Calendar]] and make it all uppercase. In Edita (shipped with Phix) that is just <Ctrl A><Alt U>.
 
=={{header|PHP}}==
While PHP functions are case-sensitive (aside of <code>_()</code>), this isn't the case for language constructs.
 
<syntaxhighlight lang="php"><?PHP
ECHO <<<REALPROGRAMMERSTHINKINUPPERCASEANDCHEATBYUSINGPRINT
JANUARY FEBRUARY MARCH APRIL MAY JUNE
Line 2,768 ⟶ 2,744:
REALPROGRAMMERSTHINKINUPPERCASEANDCHEATBYUSINGPRINT
; // MAGICAL SEMICOLON</syntaxhighlight>
 
=={{header|PicoLisp}}==
The "CALENDAR.L" source file:
<syntaxhighlight lang=PicoLisp"picolisp">(DE CAL (YEAR)
(PRINL "====== " YEAR " ======")
(FOR DAT (RANGE (DATE YEAR 1 1) (DATE YEAR 12 31))
Line 2,812 ⟶ 2,787:
30 Tue
31 Wed</pre>
 
=={{header|PL/I}}==
<syntaxhighlight lang=PL"pl/Ii">(SUBRG, SIZE, FOFL):
CALENDAR: PROCEDURE (YEAR) OPTIONS (MAIN);
DECLARE YEAR CHARACTER (4) VARYING;
Line 2,867 ⟶ 2,841:
END CALENDAR;</syntaxhighlight>
See CALENDAR for result.
 
=={{header|Racket}}==
<syntaxhighlight lang="racket">
#CI(MODULE NAME-OF-THIS-FILE RACKET
(REQUIRE RACKET/DATE)
Line 2,906 ⟶ 2,879:
(CALENDAR 1969))
</syntaxhighlight>
 
=={{header|Raku}}==
(formerly Perl 6)
Uppercase is no challenge, who needs letters at all?
[Requires the year to be supplied as a command-line argument, and Unixish <i>cal</i> command.]
<syntaxhighlight lang="raku" line>$_="\0".."~";<
115 97 121 32 34 91 73 78 83 69 82 84 32 83 78 79 79 80 89 32 72 69 82 69 93 34
59 114 117 110 32 60 99 97 108 62 44 64 42 65 82 71 83 91 48 93 47 47 49 57 54 57
>."$_[99]$_[104]$_[114]$_[115]"()."$_[69]$_[86]$_[65]$_[76]"()</syntaxhighlight>
 
=={{header|REXX}}==
This is essentially the same REXX program as for the CALENDAR task, but written entirely in uppercase. Indeed,
Line 2,937 ⟶ 2,908:
(but the second REXX version sure as heck looks
<br>like it was beat with a big ole ugly stick ─── and pardon the strong language).
<syntaxhighlight lang="rexx">/*REXX PROGRAM TO SHOW ANY YEAR'S (MONTHLY) CALENDAR (WITH/WITHOUT GRID)*/
@ABC=
PARSE VALUE SCRSIZE() WITH SD SW .
Line 3,216 ⟶ 3,187:
└────┴────┴────┴────┴────┴────┴────┘
</pre>
 
=={{header|Ring}}==
<syntaxhighlight lang="ring">
# PROJECT : CALENDAR - FOR "REAL" PROGRAMMERS
# DATE : 2018/06/28
Line 3,381 ⟶ 3,351:
 
[https://www.dropbox.com/s/lb7rnqdb30a72kc/CalmoSoftRealCalendar.jpg?dl=0 CALENDAR - FOR "REAL" PROGRAMMERS]
 
=={{header|Ruby}}==
UPPERCASE RUBY is normally impossible, because Ruby is sensitive to case, and most methods and keywords have lowercase letters. To solve this task, we wrote a new program loader for UPPERCASE RUBY programs.
Line 3,388 ⟶ 3,357:
 
* <code>loadup.rb</code> is the program loader.
<syntaxhighlight lang="ruby"># loadup.rb - run UPPERCASE RUBY program
 
class Object
Line 3,417 ⟶ 3,386:
* <code>CAL.RB</code> is an UPPERCASE RUBY translation of [[Calendar#Ruby]].
{{works with|Ruby|1.8.7}}
<syntaxhighlight lang="ruby"># CAL.RB - CALENDAR
REQUIRE 'DATE'.DOWNCASE
 
Line 3,527 ⟶ 3,496:
27 28 29 30 31 24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
31 30 </pre>
 
=={{header|Seed7}}==
Seed7 keywords are lower case, so this silly solution uses the whole Calendar Task code, with small changes and all in upper case, in a text file named "CALENDAR.TXT":
Line 3,585 ⟶ 3,553:
 
Then in another program the file CALENDAR.TXT is [http://seed7.sourceforge.net/libraries/getf.htm#getf%28in_string%29 read], converted, [http://seed7.sourceforge.net/libraries/progs.htm#parseStri%28in_string,in_parseOptions,in_array_string,in_string%29 parsed] and [http://seed7.sourceforge.net/libraries/progs.htm#execute%28in_program,in_array_string,in_parseOptions,in_string%29 executed]:
<syntaxhighlight lang="seed7">$ include "seed7_05.s7i";
include "getf.s7i";
include "progs.s7i";
Line 3,638 ⟶ 3,606:
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
 
=={{header|Sidef}}==
<syntaxhighlight lang="ruby">-> DT { ('DATE'.("\LWC") + 'TIME'.("\LWC")).("\LREQUIRE") }
 
-> MONTHS_PER_COL { 6 }
Line 3,718 ⟶ 3,685:
28 29 30 31 25 26 27 28 29 30 31 29 30 27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
 
=={{header|Tcl}}==
The program starts implementing aliases for all built-in commands. This is done without using any letters at all ;).
CALENDER takes arguments of year and optional terminal width to use.
<syntaxhighlight lang="tcl">
\146\157\162\145\141\143\150 42 [\151\156\146\157 \143\157\155\155\141\156\144\163] {
\145\166\141\154 "
Line 3,810 ⟶ 3,776:
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
 
=={{header|UNIX Shell}}==
<syntaxhighlight lang="shell">CAL=CAL
TR=TR
A=A
Line 3,853 ⟶ 3,818:
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
 
=={{header|Vedit macro language}}==
In [[Calendar]] task, standard calendar.vdm macro was called to draw one month calendar.
Line 3,861 ⟶ 3,825:
Vedit macro language is case insensitive, but it is normal practice to write short commands in upper case.
 
<syntaxhighlight lang="vedit">BS(BF)
CFT(22)
#3 = 6 // NUMBER OF MONTHS PER LINE
Line 3,951 ⟶ 3,915:
28 29 30 31 25 26 27 28 29 30 31 29 30 27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
 
=={{header|Visual Basic .NET}}==
'''Compiler:''' Roslyn Visual Basic (language version >= 15.8)
Line 3,958 ⟶ 3,921:
Copied from [[Calendar#Visual_Basic_.NET]] and converted to uppercase. See entry there for description.
 
<syntaxhighlight lang="vbnet">OPTION COMPARE BINARY
OPTION EXPLICIT ON
OPTION INFER ON
Line 4,315 ⟶ 4,278:
</pre>
 
=={{header|Wren}}==
Strictly speaking, ''real'' programming is impossible in Wren which is case sensitive and keywords, library classes, methods etc. never use all upper case letters.
Line 4,324 ⟶ 4,286:
{{libheader|Wren-fmt}}
{{libheader|Wren-seq}}
<syntaxhighlight lang="ecmascript">IMPORT "/DATE" FOR DATE
IMPORT "/FMT" FOR FMT
IMPORT "/SEQ" FOR LST
Line 4,376 ⟶ 4,338:
 
{{libheader|Wren-str}}
<syntaxhighlight lang="ecmascript">import "io" for File
import "/str" for Str
import "meta" for Meta
Line 4,436 ⟶ 4,398:
30
</pre>
 
=={{header|X86 Assembly}}==
ASSEMBLE WITH: TASM CALENDAR; TLINK /t CALENDAR
 
<syntaxhighlight lang="asm"> .MODEL TINY
.CODE
.486
Line 4,651 ⟶ 4,612:
31 30
</pre>
 
=={{header|XLISP}}==
XLISP isn't case-sensitive, so in principle it would be possible just to reproduce the solution given in the "ordinary" Calendar task. But that program makes use of recursion, "fancy" data structures, long variable names, pretty-printy indentation, and a whole host of other features that I don't think REAL programmers like any better than they like lower case: so, instead, here is a version using only global variables and "<tt>DO</tt> loops like God meant them to be".
<syntaxhighlight lang="lisp">(SETQ YR 1969)
(SETQ M #("JANUARY" "FEBRUARY" "MARCH" "APRIL" "MAY" "JUNE" "JULY" "AUGUST" "SEPTEMBER" "OCTOBER" "NOVEMBER" "DECEMBER"))
(SETQ ML #(31 28 31 30 31 30 31 31 30 31 30 31))
Line 4,781 ⟶ 4,741:
21 22 23 24 25 26 27
28 29 30 31</pre>
 
=={{header|zkl}}==
{{trans|D}}
Line 4,787 ⟶ 4,746:
 
The calendar code, file UPCAL.zkl (upper cased version of [[Calendar#zkl]]):
<syntaxhighlight lang="zkl">VAR [CONST] D=TIME.DATE, DAYS="SU MO TU WE TH FR SA";
 
FCN CENTER(TEXT,M) { STRING(" "*((M-TEXT.LEN())/2),TEXT) }
Line 4,800 ⟶ 4,759:
...</syntaxhighlight>
And the pre-processor, hand rolled for the above code (file bbb.zkl):
<syntaxhighlight lang="zkl">code:=File(vm.arglist[0]).read();
code=Data(Void,code.text.toLower());
mixed:=T("string","String", "list","List", " t("," T(",",t(",",T(",
Line 4,823 ⟶ 4,782:
...
</pre>
 
{{omit from|C sharp|keywords are lower case}}
{{omit from|C++}}
Line 4,831 ⟶ 4,789:
{{omit from|Haskell|Haskell reserves words starting with uppercase letters for datatypes.}}
{{omit from|Java|Java's keywords are lower case}}
{{omit from|Mathematica}}
{{omit from|Processing|Processing's keywords are lower case}}
{{omit from|Mathematica}}
{{omit from|Python}}
{{omit from|Stata|keywords are lower case}}
{{omit from|zkl|boogers to upper case}}
[[Category:Handicap]]
10,333

edits