Bracket

From Esolang
(Redirected from )
Jump to navigation Jump to search
The title of this article is not correct because of technical limitations. The correct title is actually [.
Not to be confused with Right bracket, nor Leftbracket.

Bracket is a programming language that only uses brackets

Logo
[
Units How
[ add one
] subtract one
[[ output ascii
]] output number
[] input
][ apple 2
( start loop, stops when the top of the stack is 1 or 0
) end loop
: sepotator
[[[ go up
]]] go down
[[]] if the top of the stack, is 0 then jump to the nearest [][, if 1, ][], else no goto
[][ goto result
][] goto result
[][] ends the program
[[][ create var
[[] var add
[]] var subtract
][]] output var
& output as the input, used for setting vars from input
][][ spider
; comment and ends line

You can also switch around the brackets and the parentheses, for some reason

xkcd random number:

Normal

[:[:[:[:]]:[][];

Swap

(;(;(;(;));()():

Umm

<.<.<.<.>>.<><>,

Cat:

[:[:(:[]:[[:):[][];

Yeah