Excellang

From Esolang
Jump to navigation Jump to search

Excellang /'eksəlæŋ/ is an esolang invented by User:None1, that uses .xlsx, .xls or .csv tables as programs. A while after creating, the author thought this was a pretty stupid idea, but he still continued it.

Execution

Excellang uses threads, the threads can contain data (an unsigned unbounded integer).

Commands

Every cell contains a string, which is the command, if the command is invalid, it is ignored. Making a thread going out of bounds errors.

We use (x,y) to represent the y-th cell at the x-th row.

The x's and y's in commands should be replaced with an unbounded unsigned integer. Commands are case-insensitive.

N

Do nothing.

start

Create a thread at current cell, at the start of program, an interpreter searches the start commands and execute them, then replace the start commands with empty strings.

create x y

Create a thread at (x,y), facing right, containing data of current thread.

add x

Add x to data of current thread.

sub x

Subtract x from data of current thread, subtracting from 0 results in 0.

mul x

Multiply x with data of current thread, then store the result into data of current thread.

sum

Let the data of this thread be the sum of data of the threads directly created by this thread.

pro

Let the data of this thread be the product of data of the threads directly created by this thread.

out

Output the data of this thread as integer.

inp

Input the data of this thread as integer.

cout

Output the data of this thread mod 256 as ASCII.

cinp

Input the data of this thread mod 256 as ASCII.

addt x

Add the data of x-th thread it created to data of current thread.

subt x

Subtract the data of x-th thread it created from data of current thread, subtracting from 0 results in 0.

mult x

Multiply the data of x-th thread it created with data of current thread, then store the result into data of current thread.

hif

If data is 0, face thread to left, otherwise right.

vif

If data is 0, face thread to up, otherwise down.

up/down/left/right

Let the thread face up/down/left/right.

stop

Stop a thread.

Examples

HI

start add 72 cout add 1 cout stop

Truth Machine

right out stop
start vif
right out left