Enchantment

From Esolang
Jump to navigation Jump to search

Enchantment is the process of enchanting values in memory. When a value is enchanted it can be marked like this 26*, whereas a normal number, unenchanted, would look like this 26. You enchant values during some sort of function, macro, or loop (FML for short). Once the FML exits, all values in memory return to their original state before the FML was ran. Any values that were enchanted are reset, they lose their enchantment but remain unchanged in value, ready to be enchanted again if needed.

Example

Suppose memory initially contains:

25 24 31

Enchant the first value and lets suppose this is the start of our FML:

25* 24 31

Inside the FML, values can be modified or shuffled:

31 25* 24

When the FML ends, memory reverts to its original state, then the enchanted value is copied back on top:

25 25 31

Now, if no values in memory are enchanted during the FML then all of memory is changed normally, no reversal or anything.