Stata fun activity: produce the number 2014 without any numbers in your source code (motivated by http://codegolf.stackexchange.com/q/17005/29454).
Brute force: 2014 is the current year, so it should be a part of the current date (33 characters, unstable, only works this year):
Stable: uses conversion of Stata dates, and circumvents some rounding to get there (37 characters):
The gold standard data set (36 characters, counting 2 CRs; depends on set varabbrev on, and exploits display weight being interpreted by Stata as display weight[1]):
Brute force: 2014 is the current year, so it should be a part of the current date (33 characters, unstable, only works this year):
Code:
di `: word `=floor(_pi)' of $S_DATE'
Code:
di ceil(year(exp(_pi*_pi))+sqrt(_pi))
Code:
sysuse auto, clear di w-l*(h+h)+tr+r
Comment