User:EvyLah/public stack

From Esolang
Jump to navigation Jump to search

A stack, you are welcome to do anything to the program. Add an instruction or a few and sign it with your name.

current stack

#N#N#N#N#N#N

current output


commands

push [x] | push [x], [x] can be number or string
pop      | remove top item
add      | pop top 2 items, push second + top, 2 string will concatenate, different types will not work
negate   | top item = top item * -1
multiply | multiply second * top, one string one number will concatenate string to itself number times, 2 string won't work
mod      | second % top, if any value is string it won't work
outn     | pop and output top item as number, if it's a string output its length
outc     | pop and output top item as Unicode character, if it's a number
out      | print number if its a number, otherwise print string. value will be popped.
_x       | pop top of stack, append x to it and push the result [ [[User:Yayimhere]] ]
#N       | pop to value off stacl. if the string has spme substring that is equal to a substring of the program do not do the following line, if not then run #N agian on the next value. if it never gets a true then push back all the values and do next line [ [[User:Yayimhere]] ]
{x}      | x will now always be replaced with top of stack [ [[User:Yayimhere]] ]
$        | pop top of stack and replaced program with top of stack [ [[User:Yayimhere]] ]

You can add more commands as long as they're reasonable (not like yes | spawn black hole).

program

push 2 - evylah
push 7 - evylah
add - Ractangle
push #N
multiply