Calendar - for "REAL" programmers: Difference between revisions

Content added Content deleted
m (syntax highlighting fixup automation)
m (Automated syntax highlighting fixup (second round - minor fixes))
Line 1: Line 1:
[[Category:Handicap]]
{{task|Date and time}}
{{task|Date and time}}


Line 32: Line 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.
'''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>
<br><br>

=={{header|360 Assembly}}==
=={{header|360 Assembly}}==
<!-- Calendar for real programmers -->
<!-- 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
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.
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
<syntaxhighlight lang="360asm">* CALENDAR FOR REAL PROGRAMMERS 05/03/2017
CALENDAR CSECT
CALENDAR CSECT
USING CALENDAR,R13 BASE REGISTER
USING CALENDAR,R13 BASE REGISTER
Line 237: 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
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>
</pre>

=={{header|Ada}}==
=={{header|Ada}}==


Line 243: Line 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]]:
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>WITH PRINTABLE_CALENDAR;
<syntaxhighlight lang="ada">WITH PRINTABLE_CALENDAR;


PROCEDURE REAL_CAL IS
PROCEDURE REAL_CAL IS
Line 288: Line 287:


To change the output to 80-character devices, replace "INIT_132" by "INIT_80".
To change the output to 80-character devices, replace "INIT_132" by "INIT_80".

=={{header|ALGOL 68}}==
=={{header|ALGOL 68}}==
{{works with|ALGOL 68|Revision 1 - no extensions to language used}}
{{works with|ALGOL 68|Revision 1 - no extensions to language used}}
Line 296: Line 294:


Note: to run this code with [[ALGOL 68G]] you need to use the '''--quote-stropping''' option.
Note: to run this code with [[ALGOL 68G]] you need to use the '''--quote-stropping''' option.
<syntaxhighlight lang=algol68>'PR' QUOTE 'PR'
<syntaxhighlight lang="algol68">'PR' QUOTE 'PR'
'PROC' PRINT CALENDAR = ('INT' YEAR, PAGE WIDTH)'VOID': 'BEGIN'
'PROC' PRINT CALENDAR = ('INT' YEAR, PAGE WIDTH)'VOID': 'BEGIN'
Line 426: Line 424:
31 30
31 30
</pre>
</pre>

=={{header|AutoHotkey}}==
=={{header|AutoHotkey}}==
<syntaxhighlight lang=AutoHotkey>CALENDAR(YR){
<syntaxhighlight lang="autohotkey">CALENDAR(YR){
LASTDAY := [], DAY := []
LASTDAY := [], DAY := []
TITLES =
TITLES =
Line 467: Line 464:
RETURN RES
RETURN RES
}</syntaxhighlight>
}</syntaxhighlight>
Examples:<syntaxhighlight lang=AutoHotkey>EXAMPLES:
Examples:<syntaxhighlight lang="autohotkey">EXAMPLES:
GUI, FONT,S8, COURIER
GUI, FONT,S8, COURIER
GUI, ADD, EDIT, VYR W40 R1 LIMIT4 NUMBER, 1969
GUI, ADD, EDIT, VYR W40 R1 LIMIT4 NUMBER, 1969
Line 522: Line 519:
30
30
</pre>
</pre>

=={{header|BaCon}}==
=={{header|BaCon}}==
Choosing 132 character output. Same as the "Calendar" from [[Calendar#BaCon|the calendar task]] but using all capitals:
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" }
<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 }
DECLARE MON[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
Y$ = "1969"
Y$ = "1969"
Line 579: Line 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
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>
</pre>

=={{header|BBC BASIC}}==
=={{header|BBC BASIC}}==
{{works with|BBC BASIC for Windows}}
{{works with|BBC BASIC for Windows}}
<syntaxhighlight lang=bbcbasic> VDU 23,22,1056;336;8,16,16,128
<syntaxhighlight lang="bbcbasic"> VDU 23,22,1056;336;8,16,16,128
YEAR = 1969
YEAR = 1969
Line 651: Line 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
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>
31 30</pre>

=={{header|C}}==
=={{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).
<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: Line 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
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>
</pre>
<syntaxhighlight lang=c>/* UPPER CASE ONLY VERSION OF THE ORIGINAL CALENDAR.C, CHANGES MOSTLY TO AVOID NEEDING #INCLUDES */
<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 */
/* 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: */
/* WHEN COMPILING THIS, THE COMMAND LINE SHOULD SPECIFY -D OPTIONS FOR THE FOLLOWING WORDS: */
Line 836: Line 830:
RETURN RESULT;
RETURN RESULT;
}</syntaxhighlight>
}</syntaxhighlight>

=={{header|COBOL}}==
=={{header|COBOL}}==
Although it seems to be missing the pinup of Snoopy, see [[Calendar#COBOL|COBOL Calendar task entry]]
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''.
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}}==
=={{header|Common Lisp}}==
<syntaxhighlight lang=lisp>(QL:QUICKLOAD '(DATE-CALC))
<syntaxhighlight lang="lisp">(QL:QUICKLOAD '(DATE-CALC))


(DEFPARAMETER *DAY-ROW* "SU MO TU WE TH FR SA")
(DEFPARAMETER *DAY-ROW* "SU MO TU WE TH FR SA")
Line 955: Line 947:
30
30
NIL</pre>
NIL</pre>

=={{header|D}}==
=={{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":
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: Line 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>):
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>
<syntaxhighlight lang="d">import std.string;mixin(import("CALENDAR").toLower);void main(){}</syntaxhighlight>
{{out}}
{{out}}
<pre> [Snoopy Picture]
<pre> [Snoopy Picture]
Line 1,052: Line 1,043:
26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
26 27 28 29 30 31 23 24 25 26 27 28 29 28 29 30 31
30 </pre>
30 </pre>

=={{header|Elena}}==
=={{header|Elena}}==
ELENA 5.0 :
ELENA 5.0 :
<syntaxhighlight lang=elena>import system'text;
<syntaxhighlight lang="elena">import system'text;
import system'routines;
import system'routines;
import system'calendar;
import system'calendar;
Line 1,254: Line 1,244:
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
</pre>

=={{header|Fortran}}==
=={{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:
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>
<syntaxhighlight lang="fortran">
MODULE DATEGNASH
MODULE DATEGNASH


Line 1,456: Line 1,445:
</pre>
</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.
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}}==
=={{header|FreeBASIC}}==
<syntaxhighlight lang=freebasic>' VERSION 16-03-2016
<syntaxhighlight lang="freebasic">' VERSION 16-03-2016
' COMPILE WITH: FBC -S CONSOLE
' COMPILE WITH: FBC -S CONSOLE


Line 1,575: Line 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
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>
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}}==
=={{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:
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: Line 1,571:


This is realcal_UC.txt:
This is realcal_UC.txt:
<syntaxhighlight lang=go>PACKAGE MAIN
<syntaxhighlight lang="go">PACKAGE MAIN
IMPORT (
IMPORT (
Line 1,657: Line 1,644:


and this is realcal.go:
and this is realcal.go:
<syntaxhighlight lang=go>package main
<syntaxhighlight lang="go">package main


import (
import (
Line 1,740: Line 1,727:
30
30
</pre>
</pre>

=={{header|GUISS}}==
=={{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.
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>
<syntaxhighlight lang="guiss">RIGHTCLICK:CLOCK,ADJUST DATE AND TIME,BUTTON:CANCEL</syntaxhighlight>

=={{header|Icon}} and {{header|Unicon}}==
=={{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:
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: Line 1,753:
Also it makes me go all nostalgic for my old [[WATFIVE]] compiler. And an IBM 129 keypunch. And 5 hole paper tape.
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>$include "REALIZE.ICN"
<syntaxhighlight lang="unicon">$include "REALIZE.ICN"


LINK DATETIME
LINK DATETIME
Line 1,820: Line 1,805:
Where REALIZE.ICN would be something like this (this example is incomplete but sufficient for this program):
Where REALIZE.ICN would be something like this (this example is incomplete but sufficient for this program):


<syntaxhighlight lang=Icon>$define PROCEDURE procedure
<syntaxhighlight lang="icon">$define PROCEDURE procedure
$define END end
$define END end
$define WRITE write
$define WRITE write
Line 1,850: Line 1,835:
{{libheader|Icon Programming Library}}
{{libheader|Icon Programming Library}}
[http://www.cs.arizona.edu/icon/library/src/procs/DATETIME.ICN DATETIME.ICN provides IsLeapYear and julian]
[http://www.cs.arizona.edu/icon/library/src/procs/DATETIME.ICN DATETIME.ICN provides IsLeapYear and julian]

=={{header|J}}==
=={{header|J}}==
For added "real"ness, we also only use 1 character names:
For added "real"ness, we also only use 1 character names:


<syntaxhighlight lang=J>B=: + 4 100 400 -/@:<.@:%~ <:
<syntaxhighlight lang="j">B=: + 4 100 400 -/@:<.@:%~ <:
M=: 28+ 3, (10$5$3 2),~ 0 ~:/@:= 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
R=: (7 -@| B+ 0, +/\@}:@M) |."0 1 (0,#\#~41) (]&:>: *"1 >/)~ M
Line 1,885: Line 1,869:
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):


<syntaxhighlight lang=text> 132 F 1969
<syntaxhighlight lang="text"> 132 F 1969
[INSERT SNOOPY HERE]
[INSERT SNOOPY HERE]
1969
1969
Line 1,910: Line 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).
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}}==
=={{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.
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.
This example does require a small function with Julia's lowercase keywords, perhaps loaded on startup from a separate file.
<syntaxhighlight lang=julia>
<syntaxhighlight lang="julia">
# IF THIS SMALL FUNCTION IS PLACED IN THE STARTUP.JL
# IF THIS SMALL FUNCTION IS PLACED IN THE STARTUP.JL
# FILE, IT WILL BE LOADED ON STARTUP. THE REST OF
# FILE, IT WILL BE LOADED ON STARTUP. THE REST OF
Line 1,994: Line 1,977:


</pre>
</pre>

=={{header|Kotlin}}==
=={{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:
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: Line 1,986:
This is calendar_UC.txt:
This is calendar_UC.txt:


<syntaxhighlight lang=scala>IMPORT JAVA.TEXT.*
<syntaxhighlight lang="scala">IMPORT JAVA.TEXT.*
IMPORT JAVA.UTIL.*
IMPORT JAVA.UTIL.*
IMPORT JAVA.IO.PRINTSTREAM
IMPORT JAVA.IO.PRINTSTREAM
Line 2,059: Line 2,041:
and this is real_calendar.kt:
and this is real_calendar.kt:


<syntaxhighlight lang=scala>// version 1.1.3
<syntaxhighlight lang="scala">// version 1.1.3


import java.io.File
import java.io.File
Line 2,146: Line 2,128:
which generates (on disk) calendar_NC.kt:
which generates (on disk) calendar_NC.kt:


<syntaxhighlight lang=scala>import java.text.*
<syntaxhighlight lang="scala">import java.text.*
import java.util.*
import java.util.*
import java.io.PrintStream
import java.io.PrintStream
Line 2,241: Line 2,223:
30
30
</pre>
</pre>

=={{header|Lua}}==
=={{header|Lua}}==
Tested with Lua 5.3.2
Tested with Lua 5.3.2
Line 2,249: Line 2,230:
The upper case Lua source - stored in a file called UCCALENDAR.LUU:
The upper case Lua source - stored in a file called UCCALENDAR.LUU:
<br>
<br>
<syntaxhighlight lang=lua>FUNCTION PRINT_CAL(YEAR)
<syntaxhighlight lang="lua">FUNCTION PRINT_CAL(YEAR)
LOCAL MONTHS={"JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE",
LOCAL MONTHS={"JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE",
"JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"}
"JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"}
Line 2,314: Line 2,295:
</syntaxhighlight>
</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):
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 lang="lua">do io.input( arg[ 1 ] ); local s = io.read( "*a" ):lower(); io.close(); assert( load( s ) )() end
</syntaxhighlight>
</syntaxhighlight>
The following command will execute the UCCALENDAR.LUU source (replace lua532 with the appropriate command for your system):
The following command will execute the UCCALENDAR.LUU source (replace lua532 with the appropriate command for your system):
Line 2,364: Line 2,345:
</pre>
</pre>

=={{header|M2000 Interpreter}}==
=={{header|M2000 Interpreter}}==
Console 132 characters by 43 lines. Six columns for months.
Console 132 characters by 43 lines. Six columns for months.


<syntaxhighlight lang=M2000 Interpreter>
<syntaxhighlight lang="m2000 interpreter">
\\ Calendar - for "REAL" programmers
\\ Calendar - for "REAL" programmers
\\ All statements in UPPERCASE
\\ All statements in UPPERCASE
Line 2,517: Line 2,497:
RETURN
RETURN
</syntaxhighlight>
</syntaxhighlight>

=={{header|Nim}}==
=={{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.
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: Line 2,506:
Here is the helper program:
Here is the helper program:


<syntaxhighlight lang=text>import strutils
<syntaxhighlight lang="text">import strutils


const progUpper = staticRead("calendar_upper.txt")
const progUpper = staticRead("calendar_upper.txt")
Line 2,561: Line 2,540:
Here is the actual program in uppercase.
Here is the actual program in uppercase.


<syntaxhighlight lang=text>IMPORT TIMES
<syntaxhighlight lang="text">IMPORT TIMES
IMPORT STRFORMAT
IMPORT STRFORMAT
Line 2,632: Line 2,611:
24 25 26 27 28 29 30 29 30 31
24 25 26 27 28 29 30 29 30 31
</pre>
</pre>

=={{header|Perl}}==
=={{header|Perl}}==
Since we can't use <code>eval</code> or <code>print</code> (or any other keywords)
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.
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 = '\'
<syntaxhighlight lang="perl">$PROGRAM = '\'


MY @START_DOW = (3, 6, 6, 2, 4, 0,
MY @START_DOW = (3, 6, 6, 2, 4, 0,
Line 2,681: Line 2,659:


`${E}${C}${H}${O} $PROGRAM | ${T}${R} A-Z ${A}-${Z} | ${P}${E}${R}${L}`;</syntaxhighlight>
`${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>$_=$ARGV[0]//1969;`\143\141\154 $_ >&2`</syntaxhighlight>
Although, if we are abusing the backticks and other innocent programs, why not just: <syntaxhighlight lang="perl">$_=$ARGV[0]//1969;`\143\141\154 $_ >&2`</syntaxhighlight>

=={{header|Phix}}==
=={{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.
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
So, the first task is to take a copy of [[Calendar#Phix|Calendar]] and make it output uppercase. Change the line
<!--<syntaxhighlight lang=Phix>(phixonline)-->
<!--<syntaxhighlight lang="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>
<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>-->
<!--</syntaxhighlight>-->
in routine centre to:
in routine centre to:
<!--<syntaxhighlight lang=Phix>(phixonline)-->
<!--<syntaxhighlight lang="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>
<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>-->
<!--</syntaxhighlight>-->
Line 2,698: Line 2,675:


In psym.e you can find the line
In psym.e you can find the line
<!--<syntaxhighlight lang=Phix>(phixonline)-->
<!--<syntaxhighlight lang="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>
<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>-->
<!--</syntaxhighlight>-->
Immediately after that (it should now be there commented out) add:
Immediately after that (it should now be there commented out) add:
<!--<syntaxhighlight lang=Phix>(phixonline)-->
<!--<syntaxhighlight lang="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>
<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>-->
<!--</syntaxhighlight>-->
Line 2,709: Line 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):
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>(phixonline)-->
<!--<syntaxhighlight lang="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: #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>
<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: Line 2,693:
<!--</syntaxhighlight>-->
<!--</syntaxhighlight>-->
and you can find the line
and you can find the line
<!--<syntaxhighlight lang=Phix>(phixonline)-->
<!--<syntaxhighlight lang="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>
<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>-->
<!--</syntaxhighlight>-->
Sometime after that, in fact after the very last use of tt_stringF, add (likewise you should find this one commented out):
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>(phixonline)-->
<!--<syntaxhighlight lang="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>
<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>-->
<!--</syntaxhighlight>-->
Line 2,728: Line 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
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)
checked is mapped to lower case, ie change (twice)
<!--<syntaxhighlight lang=Phix>(phixonline)-->
<!--<syntaxhighlight lang="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>
<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>-->
<!--</syntaxhighlight>-->
to
to
<!--<syntaxhighlight lang=Phix>(phixonline)-->
<!--<syntaxhighlight lang="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>
<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>-->
<!--</syntaxhighlight>-->
Line 2,744: Line 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>.
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}}==
=={{header|PHP}}==
While PHP functions are case-sensitive (aside of <code>_()</code>), this isn't the case for language constructs.
While PHP functions are case-sensitive (aside of <code>_()</code>), this isn't the case for language constructs.


<syntaxhighlight lang=php><?PHP
<syntaxhighlight lang="php"><?PHP
ECHO <<<REALPROGRAMMERSTHINKINUPPERCASEANDCHEATBYUSINGPRINT
ECHO <<<REALPROGRAMMERSTHINKINUPPERCASEANDCHEATBYUSINGPRINT
JANUARY FEBRUARY MARCH APRIL MAY JUNE
JANUARY FEBRUARY MARCH APRIL MAY JUNE
Line 2,768: Line 2,744:
REALPROGRAMMERSTHINKINUPPERCASEANDCHEATBYUSINGPRINT
REALPROGRAMMERSTHINKINUPPERCASEANDCHEATBYUSINGPRINT
; // MAGICAL SEMICOLON</syntaxhighlight>
; // MAGICAL SEMICOLON</syntaxhighlight>

=={{header|PicoLisp}}==
=={{header|PicoLisp}}==
The "CALENDAR.L" source file:
The "CALENDAR.L" source file:
<syntaxhighlight lang=PicoLisp>(DE CAL (YEAR)
<syntaxhighlight lang="picolisp">(DE CAL (YEAR)
(PRINL "====== " YEAR " ======")
(PRINL "====== " YEAR " ======")
(FOR DAT (RANGE (DATE YEAR 1 1) (DATE YEAR 12 31))
(FOR DAT (RANGE (DATE YEAR 1 1) (DATE YEAR 12 31))
Line 2,812: Line 2,787:
30 Tue
30 Tue
31 Wed</pre>
31 Wed</pre>

=={{header|PL/I}}==
=={{header|PL/I}}==
<syntaxhighlight lang=PL/I>(SUBRG, SIZE, FOFL):
<syntaxhighlight lang="pl/i">(SUBRG, SIZE, FOFL):
CALENDAR: PROCEDURE (YEAR) OPTIONS (MAIN);
CALENDAR: PROCEDURE (YEAR) OPTIONS (MAIN);
DECLARE YEAR CHARACTER (4) VARYING;
DECLARE YEAR CHARACTER (4) VARYING;
Line 2,867: Line 2,841:
END CALENDAR;</syntaxhighlight>
END CALENDAR;</syntaxhighlight>
See CALENDAR for result.
See CALENDAR for result.

=={{header|Racket}}==
=={{header|Racket}}==
<syntaxhighlight lang=racket>
<syntaxhighlight lang="racket">
#CI(MODULE NAME-OF-THIS-FILE RACKET
#CI(MODULE NAME-OF-THIS-FILE RACKET
(REQUIRE RACKET/DATE)
(REQUIRE RACKET/DATE)
Line 2,906: Line 2,879:
(CALENDAR 1969))
(CALENDAR 1969))
</syntaxhighlight>
</syntaxhighlight>

=={{header|Raku}}==
=={{header|Raku}}==
(formerly Perl 6)
(formerly Perl 6)
Uppercase is no challenge, who needs letters at all?
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.]
[Requires the year to be supplied as a command-line argument, and Unixish <i>cal</i> command.]
<syntaxhighlight lang=raku line>$_="\0".."~";<
<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
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
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>
>."$_[99]$_[104]$_[114]$_[115]"()."$_[69]$_[86]$_[65]$_[76]"()</syntaxhighlight>

=={{header|REXX}}==
=={{header|REXX}}==
This is essentially the same REXX program as for the CALENDAR task, but written entirely in uppercase. Indeed,
This is essentially the same REXX program as for the CALENDAR task, but written entirely in uppercase. Indeed,
Line 2,937: Line 2,908:
(but the second REXX version sure as heck looks
(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).
<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)*/
<syntaxhighlight lang="rexx">/*REXX PROGRAM TO SHOW ANY YEAR'S (MONTHLY) CALENDAR (WITH/WITHOUT GRID)*/
@ABC=
@ABC=
PARSE VALUE SCRSIZE() WITH SD SW .
PARSE VALUE SCRSIZE() WITH SD SW .
Line 3,216: Line 3,187:
└────┴────┴────┴────┴────┴────┴────┘
└────┴────┴────┴────┴────┴────┴────┘
</pre>
</pre>

=={{header|Ring}}==
=={{header|Ring}}==
<syntaxhighlight lang=ring>
<syntaxhighlight lang="ring">
# PROJECT : CALENDAR - FOR "REAL" PROGRAMMERS
# PROJECT : CALENDAR - FOR "REAL" PROGRAMMERS
# DATE : 2018/06/28
# DATE : 2018/06/28
Line 3,381: Line 3,351:


[https://www.dropbox.com/s/lb7rnqdb30a72kc/CalmoSoftRealCalendar.jpg?dl=0 CALENDAR - FOR "REAL" PROGRAMMERS]
[https://www.dropbox.com/s/lb7rnqdb30a72kc/CalmoSoftRealCalendar.jpg?dl=0 CALENDAR - FOR "REAL" PROGRAMMERS]

=={{header|Ruby}}==
=={{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.
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: Line 3,357:


* <code>loadup.rb</code> is the program loader.
* <code>loadup.rb</code> is the program loader.
<syntaxhighlight lang=ruby># loadup.rb - run UPPERCASE RUBY program
<syntaxhighlight lang="ruby"># loadup.rb - run UPPERCASE RUBY program


class Object
class Object
Line 3,417: Line 3,386:
* <code>CAL.RB</code> is an UPPERCASE RUBY translation of [[Calendar#Ruby]].
* <code>CAL.RB</code> is an UPPERCASE RUBY translation of [[Calendar#Ruby]].
{{works with|Ruby|1.8.7}}
{{works with|Ruby|1.8.7}}
<syntaxhighlight lang=ruby># CAL.RB - CALENDAR
<syntaxhighlight lang="ruby"># CAL.RB - CALENDAR
REQUIRE 'DATE'.DOWNCASE
REQUIRE 'DATE'.DOWNCASE


Line 3,527: Line 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
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>
31 30 </pre>

=={{header|Seed7}}==
=={{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":
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: Line 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]:
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";
<syntaxhighlight lang="seed7">$ include "seed7_05.s7i";
include "getf.s7i";
include "getf.s7i";
include "progs.s7i";
include "progs.s7i";
Line 3,638: Line 3,606:
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
</pre>

=={{header|Sidef}}==
=={{header|Sidef}}==
<syntaxhighlight lang=ruby>-> DT { ('DATE'.("\LWC") + 'TIME'.("\LWC")).("\LREQUIRE") }
<syntaxhighlight lang="ruby">-> DT { ('DATE'.("\LWC") + 'TIME'.("\LWC")).("\LREQUIRE") }


-> MONTHS_PER_COL { 6 }
-> MONTHS_PER_COL { 6 }
Line 3,718: Line 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
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>
</pre>

=={{header|Tcl}}==
=={{header|Tcl}}==
The program starts implementing aliases for all built-in commands. This is done without using any letters at all ;).
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.
CALENDER takes arguments of year and optional terminal width to use.
<syntaxhighlight lang=tcl>
<syntaxhighlight lang="tcl">
\146\157\162\145\141\143\150 42 [\151\156\146\157 \143\157\155\155\141\156\144\163] {
\146\157\162\145\141\143\150 42 [\151\156\146\157 \143\157\155\155\141\156\144\163] {
\145\166\141\154 "
\145\166\141\154 "
Line 3,810: Line 3,776:
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
</pre>

=={{header|UNIX Shell}}==
=={{header|UNIX Shell}}==
<syntaxhighlight lang=shell>CAL=CAL
<syntaxhighlight lang="shell">CAL=CAL
TR=TR
TR=TR
A=A
A=A
Line 3,853: Line 3,818:
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
</pre>

=={{header|Vedit macro language}}==
=={{header|Vedit macro language}}==
In [[Calendar]] task, standard calendar.vdm macro was called to draw one month calendar.
In [[Calendar]] task, standard calendar.vdm macro was called to draw one month calendar.
Line 3,861: Line 3,825:
Vedit macro language is case insensitive, but it is normal practice to write short commands in upper case.
Vedit macro language is case insensitive, but it is normal practice to write short commands in upper case.


<syntaxhighlight lang=vedit>BS(BF)
<syntaxhighlight lang="vedit">BS(BF)
CFT(22)
CFT(22)
#3 = 6 // NUMBER OF MONTHS PER LINE
#3 = 6 // NUMBER OF MONTHS PER LINE
Line 3,951: Line 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
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>
</pre>

=={{header|Visual Basic .NET}}==
=={{header|Visual Basic .NET}}==
'''Compiler:''' Roslyn Visual Basic (language version >= 15.8)
'''Compiler:''' Roslyn Visual Basic (language version >= 15.8)
Line 3,958: Line 3,921:
Copied from [[Calendar#Visual_Basic_.NET]] and converted to uppercase. See entry there for description.
Copied from [[Calendar#Visual_Basic_.NET]] and converted to uppercase. See entry there for description.


<syntaxhighlight lang=vbnet>OPTION COMPARE BINARY
<syntaxhighlight lang="vbnet">OPTION COMPARE BINARY
OPTION EXPLICIT ON
OPTION EXPLICIT ON
OPTION INFER ON
OPTION INFER ON
Line 4,315: Line 4,278:
</pre>
</pre>

=={{header|Wren}}==
=={{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.
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: Line 4,286:
{{libheader|Wren-fmt}}
{{libheader|Wren-fmt}}
{{libheader|Wren-seq}}
{{libheader|Wren-seq}}
<syntaxhighlight lang=ecmascript>IMPORT "/DATE" FOR DATE
<syntaxhighlight lang="ecmascript">IMPORT "/DATE" FOR DATE
IMPORT "/FMT" FOR FMT
IMPORT "/FMT" FOR FMT
IMPORT "/SEQ" FOR LST
IMPORT "/SEQ" FOR LST
Line 4,376: Line 4,338:


{{libheader|Wren-str}}
{{libheader|Wren-str}}
<syntaxhighlight lang=ecmascript>import "io" for File
<syntaxhighlight lang="ecmascript">import "io" for File
import "/str" for Str
import "/str" for Str
import "meta" for Meta
import "meta" for Meta
Line 4,436: Line 4,398:
30
30
</pre>
</pre>

=={{header|X86 Assembly}}==
=={{header|X86 Assembly}}==
ASSEMBLE WITH: TASM CALENDAR; TLINK /t CALENDAR
ASSEMBLE WITH: TASM CALENDAR; TLINK /t CALENDAR


<syntaxhighlight lang=asm> .MODEL TINY
<syntaxhighlight lang="asm"> .MODEL TINY
.CODE
.CODE
.486
.486
Line 4,651: Line 4,612:
31 30
31 30
</pre>
</pre>

=={{header|XLISP}}==
=={{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".
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)
<syntaxhighlight lang="lisp">(SETQ YR 1969)
(SETQ M #("JANUARY" "FEBRUARY" "MARCH" "APRIL" "MAY" "JUNE" "JULY" "AUGUST" "SEPTEMBER" "OCTOBER" "NOVEMBER" "DECEMBER"))
(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))
(SETQ ML #(31 28 31 30 31 30 31 31 30 31 30 31))
Line 4,781: Line 4,741:
21 22 23 24 25 26 27
21 22 23 24 25 26 27
28 29 30 31</pre>
28 29 30 31</pre>

=={{header|zkl}}==
=={{header|zkl}}==
{{trans|D}}
{{trans|D}}
Line 4,787: Line 4,746:


The calendar code, file UPCAL.zkl (upper cased version of [[Calendar#zkl]]):
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";
<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) }
FCN CENTER(TEXT,M) { STRING(" "*((M-TEXT.LEN())/2),TEXT) }
Line 4,800: Line 4,759:
...</syntaxhighlight>
...</syntaxhighlight>
And the pre-processor, hand rolled for the above code (file bbb.zkl):
And the pre-processor, hand rolled for the above code (file bbb.zkl):
<syntaxhighlight lang=zkl>code:=File(vm.arglist[0]).read();
<syntaxhighlight lang="zkl">code:=File(vm.arglist[0]).read();
code=Data(Void,code.text.toLower());
code=Data(Void,code.text.toLower());
mixed:=T("string","String", "list","List", " t("," T(",",t(",",T(",
mixed:=T("string","String", "list","List", " t("," T(",",t(",",T(",
Line 4,823: Line 4,782:
...
...
</pre>
</pre>

{{omit from|C sharp|keywords are lower case}}
{{omit from|C sharp|keywords are lower case}}
{{omit from|C++}}
{{omit from|C++}}
Line 4,831: Line 4,789:
{{omit from|Haskell|Haskell reserves words starting with uppercase letters for datatypes.}}
{{omit from|Haskell|Haskell reserves words starting with uppercase letters for datatypes.}}
{{omit from|Java|Java's keywords are lower case}}
{{omit from|Java|Java's keywords are lower case}}
{{omit from|Mathematica}}
{{omit from|Processing|Processing's keywords are lower case}}
{{omit from|Processing|Processing's keywords are lower case}}
{{omit from|Mathematica}}
{{omit from|Python}}
{{omit from|Python}}
{{omit from|Stata|keywords are lower case}}
{{omit from|Stata|keywords are lower case}}
{{omit from|zkl|boogers to upper case}}
{{omit from|zkl|boogers to upper case}}
[[Category:Handicap]]