2DSPC
Jump to navigation
Jump to search
2DSPC is a 2D esolang by User:Esdraslov
commands
Whatever something is pushed to the stack, it's pushed to the start of it, so the stack functions as a queue.
command | action |
---|---|
<
|
Changes the direction of the pointer to the right |
>
|
Changes the direction of the pointer to the left |
^
|
Changes the direction of the pointer up |
v
|
Changes the direction of the pointer down |
"..."
|
A string where every character is pushed to the stack |
...
|
A number that can be pushed to the stack |
?
|
Check if the number of items in the stack is the same as before the ? , if true changes to the left, otherwise right
|
!
|
Check if the number of items in the stack is the same as before the ! , if true changes to up, otherwise down
|
.
|
Prints the first item on the stack |
´
|
Removes the last item on the stack |
@
|
Ends the program |
#
|
Kills any pointer that reaches it |
[...]
|
Does the operation to the last item on the stack when a pointer reaches it |
*
|
Duplicates the pointer |
,
|
Gets the user input and pushes it into the stack |
{
|
Checks if the last item on the stack is 0, changes to the left if true, otherwise changes to the right |
The pointer can only stand on operations, so lines (-
and |
) are required to keep the pointer from falling (going down) and killing itself
[...]
operations
Operation |
---|
* |
/ |
- |
% |
Examples
Hello World
>"Hello, World!">.v | ´ ^-?-@
Truth Machine
>,v @.{1>.v ^-<