Number-rewriting paradigm

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

Number-rewriting paradigm is an esolang created by User:Ractangle, based on the concept of String-rewriting paradigm and the LET command Forte

Syntax

Here is how the core paradigm works:

5=6
^ ^
| \- Replacement
|
\- Integer to replace

in this example, any mention of 5 will become 6!

Note that only the last rule will be executed for that specific interger!

Variable declaration is done with a double equaks sign:lowercasename==integer

Oh yeah, forgot to mention the uppercase names correspond to language variables

Name Edits the execution by
MAIN Marking where to code should start (This variable is nesesarry!)
COUNT Max count of rules being followed before the program starts executing the code (defaults to infinity)

. is used to print the number before it and removes it.

# Halt

Examples

Truth-machine

i==?
1="1.1"
0="0.#"
COUNT==100
MAIN=="I"

Replace the "?" with your input