DEA FIS

From Esolang
Jump to navigation Jump to search

DEA FIS is esoteric programming language related to standart variation of Deadfish. DEA FIS using 3-characteric commands.

Commands

command description
INC Increment
DEC Decrement
SQU Square
OUT Output
HAL (optional) halt

Interpreter

Python

code = input()
tokens = code.split()
acc = 0
for token in tokens:
    if token == "INC":
        acc += 1
    elif token == "DEC":
        acc -= 1
    elif token == "SQU":
        acc *= acc
    elif token == "OUT":
        print(acc, end="")
    elif token == "HAL":
        break

Examples

XKCD Random Number

INC INC SQU OUT

XKCD Random Number without SQU

INC INC INC INC OUT