put Forth code in when prompted to "insert command". It's extremely incomplete but has if/else statements and various other things. no comments, no strings, practically no booleans, only math is + - * /, the print function (. symbol) waits for half a second as well. example commands (keep all "." symbols when copy-pasting): : dooble 2 * ; : haff 2 / ; 5 haff DUP dooble . 1 WAIT (halves a number, in this case 5, then doubles it.) : aa 42 . ; : bb 0 . ; : iff IF aa ELSE bb THEN ; 1 iff 0 iff (if the top of the stack is 0, say 0, otherwise say 42) simple version: : a IF 42 . ELSE 0 . THEN ; 1 a 0 a : do DUP IF 1 - DUP . 0.5 WAIT do THEN ; 5 do (counts down from 4 to 0) : INTMULT_INNER DUP IF 1 - -ROT OVER + ROT INTMULT_INNER THEN ; : INTMULT OVER SWAP FLOOR 1 - INTMULT_INNER ROT DROP DROP ; 10 10 INTMULT . 1 WAIT (multiplies 10 by 10 by recursively adding)
Look up the Forth programming language, otherwise you likely won't understand the code. roadmap: - loops (I just do it recursively right now) finished: - IF/ELSE statements - return stack - functions (AKA words)