From 3898d40f190e980192c64699e7a6754e2bd97b4e Mon Sep 17 00:00:00 2001 From: Luxferre Date: Sat, 13 Jun 2026 12:08:57 +0300 Subject: [PATCH] then is optional --- lttb-manual.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lttb-manual.md b/lttb-manual.md index 332beb9..25009b9 100644 --- a/lttb-manual.md +++ b/lttb-manual.md @@ -10,7 +10,7 @@ Luxferre's Truly Tiny BASIC (henceforth LTTB) is a lean dialect of the BASIC pro * A special pseudo-variable `$` holding a random number from 0 to 9999 * Line numbering from 1 to 32767 * Unbounded subroutine call stack -* Supported commands: `LET`, `IF ... THEN`, `INPUT`, `PRINT`, `GOTO`, `GOSUB`, `RETURN`, `END`, `LIST`, `CLEAR` (synonym `NEW`), `RUN`, `LOAD`, `SAVE`, `BYE` +* Supported commands: `LET`, `IF ... (THEN)`, `INPUT`, `PRINT`, `GOTO`, `GOSUB`, `RETURN`, `END`, `LIST`, `CLEAR` (synonym `NEW`), `RUN`, `LOAD`, `SAVE`, `BYE` * Any invalid command is ignored, so it still is possible to use e.g. `REM` for comments * Allowed operations within expressions: `+`, `-`, `*`, `/`, parentheses `()` * Allowed relational operators with `IF` statements: `=`, `<>` (synonym `><`), `>`, `>=`, `<`, `<=` @@ -51,11 +51,11 @@ The following commands are the core of LTTB. Evaluates the expression `[expr]` and assigns the result to the variable `[var]`. `LET` is the only core command keyword that can be omitted in LTTB, because `[var]=` is enough to detect the assignment statement. -Examples: `let x=10`, `y = RND(1000)+8` +Examples: `let x=10`, `y = $ + 8` -### `IF [expr1] [relop] [expr2] THEN [stmt]` +### `IF [expr1] [relop] [expr2] (THEN) [stmt]` -Execute a statement `[stmt]` if the relation denoted by `relop` holds between `[expr1]` and `[expr2]`. Unlike most other TB implementations, `THEN` is mandatory in LTTB. +Execute a statement `[stmt]` if the relation denoted by `relop` holds between `[expr1]` and `[expr2]`. Using `THEN` is optional but recommended. Examples: `IF A > B THEN LET C = A-B`, `IF X<1000 THEN GOTO 400`