Skip to content

Commit 89e61b6

Browse files
committed
Simplify INPUT rule, document missing prompt string.
1 parent 5816497 commit 89e61b6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

manual.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,7 @@ Console Print and Input Statements
955955
**INPUT _var_ / I.**
956956
**INPUT "prompt"; _var_**
957957
**INPUT "prompt", _var_**
958+
**INPUT ; _var_**
958959

959960
Reads from keyboard/screen and stores
960961
the value in _var_.
@@ -965,7 +966,9 @@ Console Print and Input Statements
965966
after the prompt, spaces are printed
966967
to align to a column multiple of 10
967968
(similar to how a comma works in
968-
PRINT).
969+
`PRINT`). In the case you don't want
970+
any prompt, you can use a semicolon
971+
alone.
969972

970973
If the value can't be read because
971974
input errors, the error is stored in

src/syntax/basic.syn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ DIM_MORE: comma
381381
# INPUT
382382
INPUT_STR:
383383
"\"" emit TOK_CSTRING E_CONST_STRING emit TOK_PRINT_STR PRINT_SEP_EOL # Prints a given string
384-
PRINT_SEP_EOL # If starts with ',' or ';', don't print anyting
384+
";" # If starts with ';' don't print anyting
385385
emit { TOK_BYTE_PUT, 63 } # Prints a '?' by default
386386

387387
INPUT_VAR_LIST:

0 commit comments

Comments
 (0)