Deadfsh

From Esolang
Jump to navigation Jump to search

Deadfsh is an esolang created by User:Unname4798. It is like Deadfish, but there is no increment command.

Commands

d - decrement
s - square
o - output

Interpreter

var input = "ddso";
var number = 0;
for (var i = 0; i < input.length; i++) {
 if (input[i] = "d") {
  number -= 1;
 }
 if (input[i] = "s") {
  number *= number;
 }
 if (input[i] = "o") {
  console.log(number);
 }
}

Examples

XKCD Random Number

ddso

Variants

PocketFsh

Instructions

There are two commands:

0 - d - decrement
1 - s - square

One byte is 8 commands.

Examples

XKCD Random Number
[space]

P.S.

After the execution is done, it will output the accumulator.