[R] Some Programming Humor - Quine

Wolfgang Koller koller at isis.wu-wien.ac.at
Thu May 15 14:20:36 CEST 2003


Hi! 

It seems as if the email-program has spoiled the script, therefore a second
try (in case it is spoiled again I give a hint how to repair it: the
strings quc1, quc2, quc3, quc5 all end on a blank):

quc1<-"function () { STR <- "
quc2<-"substr(deparse(paste)[1],start=24,stop=24); "
quc3<-"recstr <- function(str=character(1),pos=195) "
quc4<-"paste(substr(str,1,pos-1),"
quc5<-"str,substr(str,pos,1000),sep=STR); "
quc6<-"eval(parse(text=recstr("
qucode<-paste(quc1,quc2,quc3,quc4,quc5,quc6,sep="")
qucode<-paste(qucode,paste(qucode,")))}",sep=""),")))}",sep="\"")
quine<-eval(parse(text=qucode))

Wolfgang




-------------------------------------------------
Wolfgang Koller,  wolfgang.koller at wu-wien.ac.at
Forschungsinstitut für Europafragen
Wirtschaftsuniversität Wien
Althanstraße 39-45, 1090 Vienna, Austria
Tel: ++43/1/31336/4147  Fax: ++43/1/31336/758
http://fgr.wu-wien.ac.at/institut/ef/ief-home.htm




More information about the R-help mailing list