Code center > Bugs and fixes
inc and dec cost energy
Sprotiel:
Looking through the code, I was fairly surprised to discover that
--- Code: ---a inc
--- End code ---
is (almost) exactly equivalent to
--- Code: ---*a 1 add a store
--- End code ---
This means that contrary to what is stated everywhere I've looked, inc and dec cost exactly as much energy as store.
Light:
They are exactly equivalent and no inc and dec do not cost any energy.
Sprotiel:
Please check by yourself. For instance with a dummy bot like
--- Code: ---cond
start
50
inc
stop
--- End code ---
and a high store cost. Note that there's another quirk: the actual store cost is 1/5th of what is displayed in the Options tab.
PurpleYouko:
inc and dec have always been free but recently there was a lot of discussion about the benefits of making it more equivalent to store.
I didn't even realise that the cost structure had been implemented though.
It must have been one of the many modifications that Numsgil added for V2.36.
Just remember that pretty much all the documantation was produced prior to this version.
Numsgil:
I haven't touched inc or dec, not even when I first started. If it's costing energy suddenly, it's new to me. :blink:
Navigation
[0] Message Index
[#] Next page
Go to full version