Brackets
Jump to navigation
Jump to search
- The title of this article is not correct because of technical limitations. The correct title is actually [].
[] is an esoteric programming language designed by Gerson Kurz which uses only the various brackets as commands.
Commands
The commands are very simple, and work like a small assembler:
| pseudocode | Brackets |
|---|---|
| MoveXtoY | ({<<x]y) |
| AddXtoY | ({[<x]y) |
| SubXFromY | ({{<x]y) |
| MultiplyXWithY | ({}<x]y) |
| DivideXWithY | ([( <x]y) |
| CompareXAndY | (]<<x]y) |
| NandXToY | (}[<x]y) |
| GotoLabelXIfNotEqual | (((<x) |
| GotoLabelX | ((<<x) |
| DeclareLabelX | (([<x) |
| PrintX | (({<x) |
| ClearX | ((}<x) |
| NegateX | ({(<x) |
| ImmediateX | ((<x> |
| RegisterXIndirect | (<<x> |
| RegisterXIndirectIncrement | ([<x> |
| RegisterXIndirectDecrement | ({<x> |
| GotoLabelXIfEqual | (}<x] |
| RegisterX | (<x> |
| DeclareDataX | [x} |
Examples
Print language name
({<<[Brackets!}](<0>)
((}<(<1>)
(([<1)
({<<([<0>](<2>)
(]<<(<1>](<2>)
(}<0]
(({<(<2>)
((<<1)
(([<0)