Actually, self-modification is possible but...

This commit is contained in:
Luxferre
2026-06-13 22:54:39 +03:00
parent e3680fb78e
commit 692018ec4f
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -62,6 +62,8 @@ Execute a statement `[stmt]` if the relation denoted by `relop` holds between `[
Examples: `IF A > B THEN LET C = A-B`, `IF X<1000 THEN GOTO 400`
Non-standard extension: if the `[stmt]` statement starts with a line number, LTTB doesn't execute it immediately but instead overwrites the original line with the number it starts with. This allows writing self-modifying programs in LTTB.
### `GOTO [expr]`
Direct jump. Evaluates `[expr]` to a line number and continues execution of the program from that line number. If the computed line number is outside the valid range (1 to 32767), the program halts.