4cell

From Esolang
Jump to navigation Jump to search
4cell
Designed by User:Legoninjaenoch
Appeared in 2022
Memory system Cell based
Computational class Total
Major implementations 4cell
File extension(s) .4cel

4cell is an esoteric programming language developed by User:Legoninjaenoch. Its name comes from the four cells that can be manipulated with commands. They are a, b, c, d. They can be increased, decreased, added, subtracted, cleared, copied, randomized, and printed.

Commands

Command Description
a Increase cell a by 1
b Increase cell b by 1
c Increase cell c by 1
d Increase cell d by 1
A Decrease cell a by 1
B Decrease cell b by 1
C Decrease cell c by 1
D Decrease cell d by 1
> Copies the value of a cell into another.
! Clears a cell.
? Sets cell to random number 1-144.
+ Adds two cells and stores number in specified cell.
- Subtracts two cells and stores number in specified cell.
. Prints number in cell.
, Prints ascii equivalent of number in cell.
( Starts loop, the number in the cell written after it is the number of times repeated
{ Marks beginning of command to be looped
} Marks end of command to be looped

Use lowercase letter when referencing a cell.
You can put spaces between commands but not between a command and its arguments.

Yes: >ab a b +abc
No: + a bc >b c

Examples

Loop
Increase a to 4 then start a loop that will be executed a times and the command to be executed is b.

aaaa(a{b}

Addition:
Increase a and b to 2 then add them and store in cell d.

aabb+abd

Copy/Move:
Increase c to 3 then move the value of c into d. they both contain the number 3 now.

ccc>cd

HELLO WORLD
Prints hello world in all caps.

aaaaaaaa(a{aaaaaaaa},a>abAAA,abbbb,b,bbbb,bcccc(c{ccccccc},c>bddddddddd,d,bbbb,bBBBBBB,bA,a