Egnufeb

From Esolang
Jump to navigation Jump to search

Egnufeb is a queue-based 2D esolang thought up by User:Emelang (emelchenko).

Instructions

Arrows move the pointer around.

': Makes the pointer go into string mode where it puts whatever is in the quotes into the queue. If the pointer is already in string mode, it makes the pointer go out of string mode.

i: Takes in input from the user and puts into the variable v or whichever one its set to. BTW you need to put variables in curly brackets unless theyre in an f statement, we'll get to f later.

p: Prints the first value on the queue.

§: A Nop.

/: Jumps to the latest section sign (§) before it.

|: Discards a pointer, if there is only one pointer left then it will end the program.

f: An if instruction. Statements are put in round brackets and the code to execute if the statement is true are put in square brackets after the round brackets. If the statement is false, then it skips to the next instruction.

+, -, *, /, ^ and % are all pretty much self-explanatory.

@: Clones the pointer in all 4 directions.

?: Skips the next command if the queue is empty.

d: Declare a variable. The variable's name is in round brackets and the variable's value follows in square brackets.

Examples

Hello, World!

>'Hello, World!'§p?/|

Cat Program

Regular Cat Program

>i{v}§p?/|

Looping Cat Program

>i{v}§p?/v
^/?p§{v}i<

Looping Cat Program w/o reversion

>i{v}§p?/v>i{v}§p?/v
         >^
^                  <

truth-machine

>if(v=0)['0'p|]f(v=1)[§'1'p/]

Calculator

v                                                                   <
>if(v=s)[|]v
v          <
>i{a}i{b}iv
v         <
>f(v=+)[a+b]f(v=-)[a-b]f(v=*)[a*b]f(v=/)[a/b]f(v=^)[a^b]f(v=%)[a%b]p^

A+B Problem

>i{a}i{b}+p