2d

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

2d is a programming language that is 2d, but it uses jumping and matching

Commands

[ ... ], anydir, if the code pointer is 1, jump, else turn around
( ... [a symbol that is ] or ) or }], anydir, if the symbol is ), jump,
elif the symbol is ], then set the ( to the symbol after that,
elif the symbol is }, turn around and flip the code pointer
., end the program with the code pointer value
,, input the code pointer value, 1 or 0
>v<^, change direction, but if it is opposite direction, does not work
~num~, numbers that match happen

Program

(~1~  []) (. ]) (~2~  )~1~   (
        (                    )[]
          (     )~2~[]