Difference between revisions of "Talk:My primestat"

From Kolmafia
Jump to navigation Jump to search
imported>Heeheehee
m (Return value when not logged in?)
 
imported>Jasonharper
m (GIGO)
Line 1: Line 1:
 
Re the special info: This does not make sense to me. It does return $stat[moxie], but I can't really justify this --  $stat[moxie].to_int() is 3, not 0. It'd be helpful if someone could explain -why- this happens. --[[User:Heeheehee|Heeheehee]] 04:35, 12 March 2010 (UTC)
 
Re the special info: This does not make sense to me. It does return $stat[moxie], but I can't really justify this --  $stat[moxie].to_int() is 3, not 0. It'd be helpful if someone could explain -why- this happens. --[[User:Heeheehee|Heeheehee]] 04:35, 12 March 2010 (UTC)
 +
* What's there to explain?  The not-logged-in value of functions that are only meaningful when logged in is pure garbage.  There was no effort expended towards having them return a particular value; any value that doesn't immediately cause a crash is good enough.  There is no guarantee that the garbage value will be consistent between versions of the program, or even successive calls to the function.

Revision as of 04:55, 12 March 2010

Re the special info: This does not make sense to me. It does return $stat[moxie], but I can't really justify this -- $stat[moxie].to_int() is 3, not 0. It'd be helpful if someone could explain -why- this happens. --Heeheehee 04:35, 12 March 2010 (UTC)

  • What's there to explain? The not-logged-in value of functions that are only meaningful when logged in is pure garbage. There was no effort expended towards having them return a particular value; any value that doesn't immediately cause a crash is good enough. There is no guarantee that the garbage value will be consistent between versions of the program, or even successive calls to the function.