OCBscriptOCBCCBCCB

From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

(script()) (The page name is different because the AI i am using fails to fetch the URL) is a esolang created by User:Ractangle. This language based on JavaScript and Javagony

Commands

Command Meaning
break Terminates the loop.
throw Puts the following string into a stack.
if/orif/isn't Condition commands.
try Used for the loop command.
catch Outputs the highest string in the stack.
let Creates/Edits a variable.
func is Makes a function.
loop Makes a loop of a code. It reapeats until the condition is true.
prompt Makes a prompt, the awnser is thrown into the stack.

Examples

Hello World

throw 'Hello World'
catch

Truth-machine

variable n is (
prompt
catch
)
if n is 0 (
throw '0'
catch
)
isn't n is 1 (
loop(
try
throw '1'
catch
)
)

Cat

prompt
catch

Infinite loop

loop(
try
throw 'inf'
catch
)

Deadfish implementation

let n is (
prompt
)
let a is (
throw 0
)
if n is i (
let n is (
n + 1
)
)
orif n is d (
let n is (
n - 1
)
)
orif n is s (
let n is (
n * n
)
)
orif n is o (
throw (n)
catch
)
if a is 0 or a is 256 (
variable a is (
throw 0
)
)