I created blocks that might enable text-based programming

That’s why I said it wasn’t true to bytecode. I don’t know how seriously this language is being treated, but there’s an easy and hard solution to everything, and I assume that if this language doesn’t have a lexer it might not want a preprocessor either.

It’s not true to bytecode, but it is easy.

It might be a bit late to mention this, but you can now use two or more if statements.

However, you cannot nest an if statement inside another if statement.

I can help with that, though it will require a stupid amount of restructuring.

Explanation of functions so far:
・vcre function: Takes two arguments (1st: variable identifier, 2nd: initial value) and creates a variable.
・vset function: Takes two arguments (1st: variable identifier, 2nd: value to set) and sets the variable to the specified value.
・vadd function: Takes two arguments (1st: variable identifier, 2nd: value to add) and adds the specified value to the variable.
・vsub function: Takes two arguments (1st: variable identifier, 2nd: value to subtract) and subtracts the specified value from the variable.
・mrst function: Takes no arguments. Clears the memory (resets it to an empty list).
・madd function: Takes one argument (value to add) and adds the specified value to the memory.
・mdel function: Takes one argument (index number) and deletes the element at the specified index in the memory.
・mget function: Takes one argument (index number) and stores the value at the specified index in the memory into the mv variable.
・mtov function: Takes one argument (variable identifier) ​​and assigns the value of the mv variable to the specified variable.
・ret function: Takes no arguments. Returns all variables except the mv variable.
・if function: A special function. The syntax is as follows:
if ( condition ) [
code
]
If the condition is true, the code is executed. Nesting of if statements is not permitted. The symbols that can be used for the condition are =, <, >, and !=. = means “left and right are equal,” < means “left is less than right,” > means “right is less than left,” and != means “left and right are not equal.”

You really should add if statement nesting. It’s not as difficult of a task as it may seem at first.

I’ll give it a try.

I’m guessing that you can’t just think about IF as a special case. Instead you have to arrange your parser so that instead of just forging ahead linearly through the text, you can push the current task onto a stack and start each instruction as a new task. In technical terms, I’m guessing your parser is currently a finite state machine and you’re going to have to change it to a stack machine. But I could be wrong, both about how it works now (not having read the code!) and about how it’ll have to work to handle any number of nested IFs.

Understood. I’ll give it a try. Thank you.

It is not certain whether the stack machine architecture you mentioned is employed; however, it is currently possible to nest if functions within if functions, and there is no limit to the depth of such nesting.

Description of the newly created function:
・The jmp function takes a single argument (a value) and moves the execution point to the location specified by that value.

I consider the IF function to be largely complete. Your opinion piqued my interest, so I am thinking of creating it.

Function descriptions:
・vcre function: Takes two arguments (1st: variable identifier, 2nd: initial value) and creates a variable.
・vset function: Takes two arguments (1st: variable identifier, 2nd: value to set) and sets the variable to the specified value.
・vadd function: Takes two arguments (1st: variable identifier, 2nd: value to add) and adds the specified value to the variable.
・vsub function: Takes two arguments (1st: variable identifier, 2nd: value to subtract) and subtracts the specified value from the variable.
・mrst function: Takes no arguments. Clears the memory (resets it to an empty list).
・madd function: Takes one argument (value to add) and adds the specified value to the memory.
・mdel function: Takes one argument (index number) and deletes the element at the specified index in the memory.
・mget function: Takes one argument (index number) and stores the value at the specified index in the memory into the mv variable.
・mtov function: Takes one argument (variable identifier) ​​and assigns the value of the mv variable to the specified variable.
・ret function: Takes one argument (string). If no value is specified, it returns all variables except the mv variable. If a value is specified, it returns that string.
・if function: The syntax is as follows:
if(condition)[
code
]
The code is executed if the condition is true. The symbols that can be used for the condition are =, <, >, and !=. = means “when the left-hand side and right-hand side are equal,”
< means “when the left-hand side is smaller than the right-hand side,”
> means “when the right-hand side is smaller than the left-hand side,”
!= means “when the left-hand side and right-hand side are not equal.” Examples of using the if function:
if(1 = a)[
ret(a1)
]
and
if(2 = t)[
if(1 = o)[
ret(o1t2)
]
]
・The jmp function takes one argument (a number or a label). If the argument is a number, it moves the execution position to the specified location. If the argument is a label, it moves the execution position to the location of that label.
・The jmpif function takes five or four arguments (1st argument: value or variable identifier; 2nd argument: value or variable identifier; 3rd argument: jump-target label identifier if the 1st and 2nd arguments are equal; 4th argument: jump-target label identifier if the 1st and 2nd arguments are not equal; 5th argument: jump-target label identifier after conditional processing completes). If the value of the 1st argument equals the value of the 2nd argument, it jumps to the label specified by the 3rd argument. If they are not equal, it jumps to the label specified by the 4th argument. Afterward, upon completion of the conditional processing, it jumps to the label specified by the 5th argument.

How to write a label:
Writing a string that begins with “.” creates a label.

Great project - could you edit your 1st post to make the thread title a bit more informative