We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

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

Commands

[
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
: Separator
[[[ Go up
]]] Go down
[[]] If the top of the stack, is 0 then jump to the nearest [][, if 1, ][], else no goto
[][ Go to result
][] Go to 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.

Examples

XKCD Random Number

Normal:

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

Swap:

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

Umm:

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

Cat

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

Yeah