From 6a09910dfc644b8a6d42f6facea0bde8a56894cc Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 17 Jun 2020 02:55:26 +0300 Subject: [PATCH] BROWSE: ignore invalid digits (#123) Documentation in block 100 says a number followed by a space or return lists the contents of the block. However, typing any other character does this too, because _pdacc returns -1 in this case. This is annoying because typing "n" instead of "N" immediately after jumping to some block was bringing you to block 0. Now "n" is ignored instead. This commit changes the condition for printing to explicitly check for the value of 1, which means whitespace according to _pdacc documentation in block 355. --- blk/106 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blk/106 b/blk/106 index 7ec00d8..5478463 100644 --- a/blk/106 +++ b/blk/106 @@ -2,7 +2,7 @@ CREATE ACC 0 , : _LIST ." Block " DUP . NL LIST ; : _NUM ACC @ SWAP _pdacc - IF _LIST 0 THEN + 1 = IF _LIST 0 THEN ACC ! ; : L BLK> @ _LIST ;