Darwinbots Forum

Welcome To Darwinbots => Newbie => Topic started by: happyhamsterchan on May 07, 2010, 07:51:09 PM

Title: dumb question
Post by: happyhamsterchan on May 07, 2010, 07:51:09 PM
How do I pop numbers off the stack? There's no "pop" operation
Title: dumb question
Post by: happyhamsterchan on May 07, 2010, 10:11:52 PM
oh, nevermind, every function is a "pop" function, right? so doing

gtrkbg

add

gjtkrlgnjkl

is the same as

pop pop add push

amirite?
Title: dumb question
Post by: Numsgil on May 07, 2010, 10:12:01 PM
I thought Eric added one a while ago actually.

Anyway, if not, you can simulate one.  Do something like:

0 mult add

To pop values from the integer stack.
Title: dumb question
Post by: happyhamsterchan on May 07, 2010, 10:13:33 PM
oh! yah to totally simulate a pop you need to delete the top of the stack huh? kool! TY!
Title: dumb question
Post by: Houshalter on May 07, 2010, 10:16:59 PM
Quote from: Numsgil
I thought Eric added one a while ago actually.

Anyway, if not, you can simulate one.  Do something like:

0 mult add

To pop values from the integer stack.
Thats what I said.
Title: dumb question
Post by: happyhamsterchan on May 08, 2010, 09:19:51 AM
ya I know
Title: dumb question
Post by: Moonfisher on May 08, 2010, 11:11:54 AM
I think if EricL made it, it's called drop, just as he made the dropbool operator for the boolean stack.