Omnimaga
Calculator Community => HP Calculators => Topic started by: iconmaster on December 03, 2014, 05:33:40 pm
-
Just a little something for the lulz. Name the file it goes in "QUINE", of course.
EXPORT QUINE()
BEGIN
MSGBOX(Programs["QUINE"])
END;
While I'm at it, have a program (named SELFMOD) that stores a variable, but never uses the := operator to store new values in it:
x:=0;
EXPORT SELFMOD()
BEGIN
MSGBOX("x is "+x);
Programs["SELFMOD"]:=LEFT(Programs["SELFMOD"],3)+(x+1)+MID(Programs["SELFMOD"],INSTRING(Programs["SELFMOD"],";"));
END;
-
I think to qualify as a quine, a program cannot read its own source. But this whole thing is really cool. I should play around with the new program-editing features. I feel like they could make user keys more powerful possibly.