Textual subleq

From Esolang
Jump to navigation Jump to search

Textual SUBLEQ is a programming language that's similar to Subleq but it uses strings instead of integers.


Each line is of the format:

[words]: [word] [word] [word] [words]

The first words are a "label". The next two words are variable names and their values are "subtracted": all occurrences of the second value in the first are removed. The value of a given variable can be found as follows: go to the line whose label contains that name (only one can exist) and take the ending "words" located there (these also change when the variable is changed.) Anyway, the difference between the variables is stored in the first variable. Then, if the first variable is now empty, jump to the line whose label contains the third word (there, of course, can only be one in any given program.) Output isn't defined by default but could be added as an extension.