Ironlang
Jump to navigation
Jump to search
Ironlang is an Stack based esolang thought up by User: Froginstarch
Instructions
Instruction | Description | Example |
---|---|---|
func | Creates a user defined function | func add + . ; |
. | Prints top value from the stack | "hi" . |
< | pop top value off the stack | 2 3 < . |
if(cond) .. else .. ; | takes top 2 values and a condition. if true, run if block. if false, run else block. | 3 2 if(=) . else 1 ret ; |
ret | takes top value on the stack and returns 1(fail) or 0(success) | "5 4 + 9 if (=) 0 ret else 1 ret ; |
+, -, /, *, % | basic maths operations. pops 2 values of the stack and performs the specified operation | 1 5 * 2 / . |
loop step .. ; | performs a loop from second value on the stack to the first values on the stack | 100 1 loop step + . ; |
; | ends a if block, loop block, and function definition | 100 1 loop step + . ; |
dup | duplicates the top item on the stack | 10 dup + . |
Examples
Add your own!
Interpreters
there are none as of now
frog :) |