Self++

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

Self++ (or S++) is a language by User:H33T33 that builds on top of Self, Self 2, and Self but with loops, making them slightly more practical.

How it works

Keywords

self

The self keyword is primarily used for outputting (specifically itself and the preceding string) as well as moving to the next line (\n) and clearing the console.

For example, the code below will output "self":

self

If there is a string behind it, it will output itself along with that string. The following code will output "haha self":

haha self

loop

The loop keyword will loop through a piece of code a given number of times (which is given after the keyword). The following code will output "haha self" three times:

haha self loop 3

loop only loops through the previous two strings it was given. If the number given is below zero, it will loop infinitely.

no

The no keyword does not have all that many uses. When following self, it clears the console. The code below will output "haha self" then clear it:

haha self
no self

more

When following loop, it extends the number of strings loop takes by two. The following code will output "haha self whoa self" three times:

haha self whoa self more loop 3

If no follows (making no more), it quits the program. The code below would output "haha self" but not "whoa self":

haha self
no more
whoa self

other

Defines a variable by the name of the string behind it with the value ahead of it. The code below will define a variable by the name "haha" with a value of 3:

haha other 3
haha other self

When outputting, if there is nothing behind other or the value is empty, it will output "other" rather than the given variable's value.

Other Selfs (Not made by me)