Calendar - for "REAL" programmers: Difference between revisions

m
Line 1,209:
 
=={{header|Phix}}==
OK, I'm not going to take this too seriously but this is as good an opportunity as I'll ever get to showcase how trivial it is to make some rather fundamental changes to the compiler.
OK, so the first task is to take a copy of [[Calendar#Phix|Calendar]] and make it output uppercase. Change the line
 
OKSo, so the first task is to take a copy of [[Calendar#Phix|Calendar]] and make it output uppercase. Change the line
<lang Phix>return repeat(' ',left)&s&repeat(' ',right)</lang>
in routine centre to:
Line 1,241 ⟶ 1,243:
<lang Phix>Ch = find(lower(Ch),escchar)</lang>
 
One last problem remains. The statement timedelta(days:=-1) is getting that <code>days</code> from builtins\timedate.e, and you would have to modify that file so it declares <code>DAYS</code>. There is probably some change in ptok.e/pttree.e even simpler than the steps outlined above that makes everything case insensitive, but locating that is left as an exercise for the reader!
 
You don't actually have to repackage to test this, just run p p test.exw
7,820

edits